summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2023-04-13 18:43:23 +0100
committerGitHub <noreply@github.com>2023-04-13 19:43:23 +0200
commit6e8618ae0f55bcaa4cfaaa579b4e21f9f74b117d (patch)
treedc0facd89b255b2bffe51b33920e46cb2a5d55d1 /cli/tests
parent4e53bc5a94a66858e9c141c7d807a8c9caa93403 (diff)
refactor(cli): move runTests() and runBenchmarks() to rust (#18563)
Stores the test/bench functions in rust op state during registration. The functions are wrapped in JS first so that they return a directly convertible `TestResult`/`BenchResult`. Test steps are still mostly handled in JS since they are pretty much invoked by the user. Allows removing a bunch of infrastructure for communicating between JS and rust. Allows using rust utilities for things like shuffling tests (`Vec::shuffle`). We can progressively move op and resource sanitization to rust as well. Fixes #17122. Fixes #17312.
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/testdata/test/doc_only.out1
-rw-r--r--cli/tests/testdata/test/shuffle.out30
-rw-r--r--cli/tests/testdata/test/text.out1
3 files changed, 15 insertions, 17 deletions
diff --git a/cli/tests/testdata/test/doc_only.out b/cli/tests/testdata/test/doc_only.out
index a6cb89df0..2b8b6dc73 100644
--- a/cli/tests/testdata/test/doc_only.out
+++ b/cli/tests/testdata/test/doc_only.out
@@ -1,5 +1,4 @@
Check [WILDCARD]/test/doc_only/mod.ts$2-5.ts
-running 0 tests from ./test/doc_only/mod.ts
ok | 0 passed | 0 failed ([WILDCARD])
diff --git a/cli/tests/testdata/test/shuffle.out b/cli/tests/testdata/test/shuffle.out
index 28bd97d5c..fdc2ca9ed 100644
--- a/cli/tests/testdata/test/shuffle.out
+++ b/cli/tests/testdata/test/shuffle.out
@@ -2,38 +2,38 @@ Check [WILDCARD]/test/shuffle/bar_test.ts
Check [WILDCARD]/test/shuffle/baz_test.ts
Check [WILDCARD]/test/shuffle/foo_test.ts
running 10 tests from ./test/shuffle/foo_test.ts
-test 2 ... ok ([WILDCARD])
test 3 ... ok ([WILDCARD])
-test 6 ... ok ([WILDCARD])
-test 9 ... ok ([WILDCARD])
-test 8 ... ok ([WILDCARD])
+test 2 ... ok ([WILDCARD])
test 7 ... ok ([WILDCARD])
test 5 ... ok ([WILDCARD])
+test 8 ... ok ([WILDCARD])
+test 0 ... ok ([WILDCARD])
+test 9 ... ok ([WILDCARD])
test 4 ... ok ([WILDCARD])
+test 6 ... ok ([WILDCARD])
test 1 ... ok ([WILDCARD])
-test 0 ... ok ([WILDCARD])
running 10 tests from ./test/shuffle/baz_test.ts
-test 2 ... ok ([WILDCARD])
test 3 ... ok ([WILDCARD])
-test 6 ... ok ([WILDCARD])
-test 9 ... ok ([WILDCARD])
-test 8 ... ok ([WILDCARD])
+test 2 ... ok ([WILDCARD])
test 7 ... ok ([WILDCARD])
test 5 ... ok ([WILDCARD])
+test 8 ... ok ([WILDCARD])
+test 0 ... ok ([WILDCARD])
+test 9 ... ok ([WILDCARD])
test 4 ... ok ([WILDCARD])
+test 6 ... ok ([WILDCARD])
test 1 ... ok ([WILDCARD])
-test 0 ... ok ([WILDCARD])
running 10 tests from ./test/shuffle/bar_test.ts
-test 2 ... ok ([WILDCARD])
test 3 ... ok ([WILDCARD])
-test 6 ... ok ([WILDCARD])
-test 9 ... ok ([WILDCARD])
-test 8 ... ok ([WILDCARD])
+test 2 ... ok ([WILDCARD])
test 7 ... ok ([WILDCARD])
test 5 ... ok ([WILDCARD])
+test 8 ... ok ([WILDCARD])
+test 0 ... ok ([WILDCARD])
+test 9 ... ok ([WILDCARD])
test 4 ... ok ([WILDCARD])
+test 6 ... ok ([WILDCARD])
test 1 ... ok ([WILDCARD])
-test 0 ... ok ([WILDCARD])
ok | 30 passed | 0 failed ([WILDCARD])
diff --git a/cli/tests/testdata/test/text.out b/cli/tests/testdata/test/text.out
index 354dc24b5..f1b7f7d01 100644
--- a/cli/tests/testdata/test/text.out
+++ b/cli/tests/testdata/test/text.out
@@ -1,4 +1,3 @@
-running 0 tests from ./test/text.md
ok | 0 passed | 0 failed ([WILDCARD])