diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-08-02 18:38:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 18:38:10 +0200 |
commit | 029bdf0cd55e96f393614ca566d57e4330ac9135 (patch) | |
tree | ccc9f64068c70fcae1fcceba3920b375bcc19ce2 /cli/tests/testdata | |
parent | d9c85e016f054fd3b6c68a54213e7c0ad8c3a8f4 (diff) |
feat(cli): Add dot test reporter (#19804)
This commit adds a "dot" reporter to "deno test" subcommand,
that can be activated using "--dot" flag.
It provides a concise output using:
- "." for passing test
- "," for ignored test
- "!" for failing test
User output is silenced and not printed to the console.
In non-TTY environments each result is printed on a separate line.
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r-- | cli/tests/testdata/test/steps/failing_steps.dot.out | 54 | ||||
-rw-r--r-- | cli/tests/testdata/test/steps/ignored_steps.dot.out | 6 | ||||
-rw-r--r-- | cli/tests/testdata/test/steps/passing_steps.dot.out | 17 |
3 files changed, 77 insertions, 0 deletions
diff --git a/cli/tests/testdata/test/steps/failing_steps.dot.out b/cli/tests/testdata/test/steps/failing_steps.dot.out new file mode 100644 index 000000000..3895a967e --- /dev/null +++ b/cli/tests/testdata/test/steps/failing_steps.dot.out @@ -0,0 +1,54 @@ +[WILDCARD] +! +. +! +! +! +! +! +! +! + + ERRORS + +nested failure ... step 1 ... inner 1 => ./test/steps/failing_steps.ts:[WILDCARD] +error: Error: Failed. + throw new Error("Failed."); + ^ + at [WILDCARD]/failing_steps.ts:[WILDCARD] + +multiple test step failures ... step 1 => ./test/steps/failing_steps.ts:[WILDCARD] +error: Error: Fail. + throw new Error("Fail."); + ^ + at [WILDCARD]/failing_steps.ts:[WILDCARD] + +multiple test step failures ... step 2 => ./test/steps/failing_steps.ts:[WILDCARD] +error: Error: Fail. + await t.step("step 2", () => Promise.reject(new Error("Fail."))); + ^ + at [WILDCARD]/failing_steps.ts:[WILDCARD] + +failing step in failing test ... step 1 => ./test/steps/failing_steps.ts:[WILDCARD] +error: Error: Fail. + throw new Error("Fail."); + ^ + at [WILDCARD]/failing_steps.ts:[WILDCARD] + +failing step in failing test => ./test/steps/failing_steps.ts:[WILDCARD] +error: Error: Fail test. + throw new Error("Fail test."); + ^ + at [WILDCARD]/failing_steps.ts:[WILDCARD] + + FAILURES + +nested failure ... step 1 ... inner 1 => ./test/steps/failing_steps.ts:[WILDCARD] +multiple test step failures ... step 1 => ./test/steps/failing_steps.ts:[WILDCARD] +multiple test step failures ... step 2 => ./test/steps/failing_steps.ts:[WILDCARD] +failing step in failing test ... step 1 => ./test/steps/failing_steps.ts:[WILDCARD] +failing step in failing test => ./test/steps/failing_steps.ts:[WILDCARD] + +FAILED | 0 passed (1 step) | 3 failed (5 steps) ([WILDCARD]) + +error: Test failed diff --git a/cli/tests/testdata/test/steps/ignored_steps.dot.out b/cli/tests/testdata/test/steps/ignored_steps.dot.out new file mode 100644 index 000000000..e3d3865d4 --- /dev/null +++ b/cli/tests/testdata/test/steps/ignored_steps.dot.out @@ -0,0 +1,6 @@ +[WILDCARD] +, +. +. + +ok | 1 passed (1 step) | 0 failed | 0 ignored (1 step) [WILDCARD] diff --git a/cli/tests/testdata/test/steps/passing_steps.dot.out b/cli/tests/testdata/test/steps/passing_steps.dot.out new file mode 100644 index 000000000..243cacd69 --- /dev/null +++ b/cli/tests/testdata/test/steps/passing_steps.dot.out @@ -0,0 +1,17 @@ +[WILDCARD] +. +. +. +. +. +. +. +. +. +. +. +. +. + +ok | 6 passed (21 steps) | 0 failed ([WILDCARD]) + |