diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/testdata/test/ignore.ts | 10 | ||||
-rw-r--r-- | cli/tests/testdata/test/only.out | 5 | ||||
-rw-r--r-- | cli/tests/testdata/test/only.ts | 5 |
3 files changed, 17 insertions, 3 deletions
diff --git a/cli/tests/testdata/test/ignore.ts b/cli/tests/testdata/test/ignore.ts index 01113a129..2339835db 100644 --- a/cli/tests/testdata/test/ignore.ts +++ b/cli/tests/testdata/test/ignore.ts @@ -1,4 +1,4 @@ -for (let i = 0; i < 10; i++) { +for (let i = 0; i < 5; i++) { Deno.test({ name: `test ${i}`, ignore: true, @@ -7,3 +7,11 @@ for (let i = 0; i < 10; i++) { }, }); } +for (let i = 5; i < 10; i++) { + Deno.test.ignore({ + name: `test ${i}`, + fn() { + throw new Error("unreachable"); + }, + }); +} diff --git a/cli/tests/testdata/test/only.out b/cli/tests/testdata/test/only.out index bd5ca84e4..2e66ed22b 100644 --- a/cli/tests/testdata/test/only.out +++ b/cli/tests/testdata/test/only.out @@ -1,7 +1,8 @@ Check [WILDCARD]/test/only.ts -running 1 test from ./test/only.ts +running 2 tests from ./test/only.ts only ... ok ([WILDCARD]) +only2 ... ok ([WILDCARD]) -ok | 1 passed | 0 failed | 2 filtered out ([WILDCARD]) +ok | 2 passed | 0 failed | 2 filtered out ([WILDCARD]) error: Test failed because the "only" option was used diff --git a/cli/tests/testdata/test/only.ts b/cli/tests/testdata/test/only.ts index 03c4dcac3..26b4cd425 100644 --- a/cli/tests/testdata/test/only.ts +++ b/cli/tests/testdata/test/only.ts @@ -9,6 +9,11 @@ Deno.test({ fn() {}, }); +Deno.test.only({ + name: "only2", + fn() {}, +}); + Deno.test({ name: "after", fn() {}, |