summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tests/integration/test_tests.rs6
-rw-r--r--cli/tests/testdata/test/filter.out12
-rw-r--r--cli/tests/testdata/test/filter/a_test.ts3
-rw-r--r--cli/tests/testdata/test/filter/b_test.ts3
-rw-r--r--cli/tests/testdata/test/filter/c_test.ts3
5 files changed, 27 insertions, 0 deletions
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs
index b9b2d41ff..36bd6b94c 100644
--- a/cli/tests/integration/test_tests.rs
+++ b/cli/tests/integration/test_tests.rs
@@ -139,6 +139,12 @@ itest!(unhandled_rejection {
output: "test/unhandled_rejection.out",
});
+itest!(filter {
+ args: "test --filter=foo test/filter",
+ exit_code: 0,
+ output: "test/filter.out",
+});
+
itest!(shuffle {
args: "test --shuffle test/shuffle",
exit_code: 0,
diff --git a/cli/tests/testdata/test/filter.out b/cli/tests/testdata/test/filter.out
new file mode 100644
index 000000000..5cb150897
--- /dev/null
+++ b/cli/tests/testdata/test/filter.out
@@ -0,0 +1,12 @@
+Check [WILDCARD]/test/filter/a_test.ts
+Check [WILDCARD]/test/filter/b_test.ts
+Check [WILDCARD]/test/filter/c_test.ts
+running 1 test from [WILDCARD]/test/filter/a_test.ts
+test foo ... ok ([WILDCARD])
+running 1 test from [WILDCARD]/test/filter/b_test.ts
+test foo ... ok ([WILDCARD])
+running 1 test from [WILDCARD]/test/filter/c_test.ts
+test foo ... ok ([WILDCARD])
+
+test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out ([WILDCARD])
+
diff --git a/cli/tests/testdata/test/filter/a_test.ts b/cli/tests/testdata/test/filter/a_test.ts
new file mode 100644
index 000000000..a3f32968a
--- /dev/null
+++ b/cli/tests/testdata/test/filter/a_test.ts
@@ -0,0 +1,3 @@
+Deno.test("foo", function () {});
+Deno.test("bar", function () {});
+Deno.test("baz", function () {});
diff --git a/cli/tests/testdata/test/filter/b_test.ts b/cli/tests/testdata/test/filter/b_test.ts
new file mode 100644
index 000000000..a3f32968a
--- /dev/null
+++ b/cli/tests/testdata/test/filter/b_test.ts
@@ -0,0 +1,3 @@
+Deno.test("foo", function () {});
+Deno.test("bar", function () {});
+Deno.test("baz", function () {});
diff --git a/cli/tests/testdata/test/filter/c_test.ts b/cli/tests/testdata/test/filter/c_test.ts
new file mode 100644
index 000000000..a3f32968a
--- /dev/null
+++ b/cli/tests/testdata/test/filter/c_test.ts
@@ -0,0 +1,3 @@
+Deno.test("foo", function () {});
+Deno.test("bar", function () {});
+Deno.test("baz", function () {});