diff options
| author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-09-06 17:07:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-06 17:07:37 +0100 |
| commit | 2cbd1b40cb4392b6a4f6b2e7315e610f488d66b7 (patch) | |
| tree | 05b4dbb0ba40cc3c5a3dd9f94cd9cb5624187bea /cli/tests | |
| parent | e0a269c23af2bccfa71d7a22506a348574be138a (diff) | |
fix(test): apply filter before checking for "only" (#20389)
Diffstat (limited to 'cli/tests')
| -rw-r--r-- | cli/tests/integration/test_tests.rs | 5 | ||||
| -rw-r--r-- | cli/tests/testdata/test/filtered_out_only.out | 5 | ||||
| -rw-r--r-- | cli/tests/testdata/test/filtered_out_only.ts | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs index f84c2a560..042e84078 100644 --- a/cli/tests/integration/test_tests.rs +++ b/cli/tests/integration/test_tests.rs @@ -91,6 +91,11 @@ itest!(test_with_malformed_config { output: "test/collect_with_malformed_config.out", }); +itest!(test_filtered_out_only { + args: "test --quiet --filter foo test/filtered_out_only.ts", + output: "test/filtered_out_only.out", +}); + itest!(parallel_flag { args: "test test/short-pass.ts --parallel", exit_code: 0, diff --git a/cli/tests/testdata/test/filtered_out_only.out b/cli/tests/testdata/test/filtered_out_only.out new file mode 100644 index 000000000..337893848 --- /dev/null +++ b/cli/tests/testdata/test/filtered_out_only.out @@ -0,0 +1,5 @@ +running 1 test from ./test/filtered_out_only.ts +foo ... ok ([WILDCARD]) + +ok | 1 passed | 0 failed | 1 filtered out ([WILDCARD]) + diff --git a/cli/tests/testdata/test/filtered_out_only.ts b/cli/tests/testdata/test/filtered_out_only.ts new file mode 100644 index 000000000..bda301a43 --- /dev/null +++ b/cli/tests/testdata/test/filtered_out_only.ts @@ -0,0 +1,2 @@ +Deno.test("foo", () => {}); +Deno.test("bar", { only: true }, () => {}); |
