summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/test_tests.rs12
-rw-r--r--cli/tests/test/shuffle.out39
-rw-r--r--cli/tests/test/shuffle/bar_test.ts3
-rw-r--r--cli/tests/test/shuffle/baz_test.ts3
-rw-r--r--cli/tests/test/shuffle/foo_test.ts3
5 files changed, 60 insertions, 0 deletions
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs
index 3bc81c5d3..c029b154d 100644
--- a/cli/tests/integration/test_tests.rs
+++ b/cli/tests/integration/test_tests.rs
@@ -114,3 +114,15 @@ itest!(unhandled_rejection {
exit_code: 1,
output: "test/unhandled_rejection.out",
});
+
+itest!(shuffle {
+ args: "test --shuffle test/shuffle",
+ exit_code: 0,
+ output_str: Some("[WILDCARD]"),
+});
+
+itest!(shuffle_with_seed {
+ args: "test --shuffle=42 test/shuffle",
+ exit_code: 0,
+ output: "test/shuffle.out",
+});
diff --git a/cli/tests/test/shuffle.out b/cli/tests/test/shuffle.out
new file mode 100644
index 000000000..04dd08ee2
--- /dev/null
+++ b/cli/tests/test/shuffle.out
@@ -0,0 +1,39 @@
+Check [WILDCARD]/test/shuffle/foo_test.ts
+Check [WILDCARD]/test/shuffle/baz_test.ts
+Check [WILDCARD]/test/shuffle/bar_test.ts
+running 10 tests from [WILDCARD]/test/shuffle/foo_test.ts
+test test 2 ... ok ([WILDCARD])
+test test 3 ... ok ([WILDCARD])
+test test 6 ... ok ([WILDCARD])
+test test 9 ... ok ([WILDCARD])
+test test 8 ... ok ([WILDCARD])
+test test 7 ... ok ([WILDCARD])
+test test 5 ... ok ([WILDCARD])
+test test 4 ... ok ([WILDCARD])
+test test 1 ... ok ([WILDCARD])
+test test 0 ... ok ([WILDCARD])
+running 10 tests from [WILDCARD]/test/shuffle/baz_test.ts
+test test 2 ... ok ([WILDCARD])
+test test 3 ... ok ([WILDCARD])
+test test 6 ... ok ([WILDCARD])
+test test 9 ... ok ([WILDCARD])
+test test 8 ... ok ([WILDCARD])
+test test 7 ... ok ([WILDCARD])
+test test 5 ... ok ([WILDCARD])
+test test 4 ... ok ([WILDCARD])
+test test 1 ... ok ([WILDCARD])
+test test 0 ... ok ([WILDCARD])
+running 10 tests from [WILDCARD]/test/shuffle/bar_test.ts
+test test 2 ... ok ([WILDCARD])
+test test 3 ... ok ([WILDCARD])
+test test 6 ... ok ([WILDCARD])
+test test 9 ... ok ([WILDCARD])
+test test 8 ... ok ([WILDCARD])
+test test 7 ... ok ([WILDCARD])
+test test 5 ... ok ([WILDCARD])
+test test 4 ... ok ([WILDCARD])
+test test 1 ... ok ([WILDCARD])
+test test 0 ... ok ([WILDCARD])
+
+test result: ok. 30 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
+
diff --git a/cli/tests/test/shuffle/bar_test.ts b/cli/tests/test/shuffle/bar_test.ts
new file mode 100644
index 000000000..ca118dc0d
--- /dev/null
+++ b/cli/tests/test/shuffle/bar_test.ts
@@ -0,0 +1,3 @@
+for (let i = 0; i < 10; i++) {
+ Deno.test(`test ${i}`, () => {});
+}
diff --git a/cli/tests/test/shuffle/baz_test.ts b/cli/tests/test/shuffle/baz_test.ts
new file mode 100644
index 000000000..ca118dc0d
--- /dev/null
+++ b/cli/tests/test/shuffle/baz_test.ts
@@ -0,0 +1,3 @@
+for (let i = 0; i < 10; i++) {
+ Deno.test(`test ${i}`, () => {});
+}
diff --git a/cli/tests/test/shuffle/foo_test.ts b/cli/tests/test/shuffle/foo_test.ts
new file mode 100644
index 000000000..ca118dc0d
--- /dev/null
+++ b/cli/tests/test/shuffle/foo_test.ts
@@ -0,0 +1,3 @@
+for (let i = 0; i < 10; i++) {
+ Deno.test(`test ${i}`, () => {});
+}