mirror of
https://github.com/denoland/deno
synced 2024-09-19 08:02:31 +00:00
test(cli): add test for test filtering (#11672)
This commit is contained in:
parent
c1f97056f4
commit
293eed0ef2
|
@ -139,6 +139,12 @@ itest!(unhandled_rejection {
|
||||||
output: "test/unhandled_rejection.out",
|
output: "test/unhandled_rejection.out",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
itest!(filter {
|
||||||
|
args: "test --filter=foo test/filter",
|
||||||
|
exit_code: 0,
|
||||||
|
output: "test/filter.out",
|
||||||
|
});
|
||||||
|
|
||||||
itest!(shuffle {
|
itest!(shuffle {
|
||||||
args: "test --shuffle test/shuffle",
|
args: "test --shuffle test/shuffle",
|
||||||
exit_code: 0,
|
exit_code: 0,
|
||||||
|
|
12
cli/tests/testdata/test/filter.out
vendored
Normal file
12
cli/tests/testdata/test/filter.out
vendored
Normal file
|
@ -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])
|
||||||
|
|
3
cli/tests/testdata/test/filter/a_test.ts
vendored
Normal file
3
cli/tests/testdata/test/filter/a_test.ts
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Deno.test("foo", function () {});
|
||||||
|
Deno.test("bar", function () {});
|
||||||
|
Deno.test("baz", function () {});
|
3
cli/tests/testdata/test/filter/b_test.ts
vendored
Normal file
3
cli/tests/testdata/test/filter/b_test.ts
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Deno.test("foo", function () {});
|
||||||
|
Deno.test("bar", function () {});
|
||||||
|
Deno.test("baz", function () {});
|
3
cli/tests/testdata/test/filter/c_test.ts
vendored
Normal file
3
cli/tests/testdata/test/filter/c_test.ts
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Deno.test("foo", function () {});
|
||||||
|
Deno.test("bar", function () {});
|
||||||
|
Deno.test("baz", function () {});
|
Loading…
Reference in a new issue