diff options
| author | HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com> | 2024-09-16 22:38:40 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-16 19:38:40 +0000 |
| commit | e0b9c745c15720914f14996bf357d5b375e2dbd8 (patch) | |
| tree | 0dfc717082bedb2eec13eceb5cdeb1ef12b8f7f5 /tests/specs/test/junit_nested | |
| parent | 6ce16145dd12d8a272cb543871276c33c8201a37 (diff) | |
chore: deprecate test itests (#25512)
This PR is part of #22907
---------
Signed-off-by: HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com>
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'tests/specs/test/junit_nested')
| -rw-r--r-- | tests/specs/test/junit_nested/__test__.jsonc | 5 | ||||
| -rw-r--r-- | tests/specs/test/junit_nested/main.out | 47 | ||||
| -rw-r--r-- | tests/specs/test/junit_nested/main.ts | 23 |
3 files changed, 75 insertions, 0 deletions
diff --git a/tests/specs/test/junit_nested/__test__.jsonc b/tests/specs/test/junit_nested/__test__.jsonc new file mode 100644 index 000000000..79b73474d --- /dev/null +++ b/tests/specs/test/junit_nested/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "test --reporter junit main.ts", + "exitCode": 1, + "output": "main.out" +} diff --git a/tests/specs/test/junit_nested/main.out b/tests/specs/test/junit_nested/main.out new file mode 100644 index 000000000..f2ac00f29 --- /dev/null +++ b/tests/specs/test/junit_nested/main.out @@ -0,0 +1,47 @@ +Check file:///[WILDCARD]/main.ts +<?xml version="1.0" encoding="UTF-8"?> +<testsuites name="deno test" tests="11" failures="6" errors="0" time="[WILDCARD]"> + <testsuite name="./main.ts" tests="11" disabled="0" errors="0" failures="6"> + <testcase name="parent 1" classname="./main.ts" time="[WILDCARD]" line="1" col="6"> + <failure message="1 test step failed">1 test step failed.</failure> + </testcase> + <testcase name="parent 2" classname="./main.ts" time="[WILDCARD]" line="8" col="6"> + <failure message="2 test steps failed">2 test steps failed.</failure> + </testcase> + <testcase name="parent 3" classname="./main.ts" time="[WILDCARD]" line="20" col="6"> + </testcase> + <testcase name="parent 1 > child 1" classname="./main.ts" time="[WILDCARD]" line="2" col="11"> + </testcase> + <testcase name="parent 1 > child 2" classname="./main.ts" time="[WILDCARD]" line="3" col="11"> + <failure message="Uncaught Error: Fail.">Error: Fail. + throw new Error("Fail."); + ^ + at file:///[WILDCARD]/main.ts:4:11 + [WILDCARD]</failure> + </testcase> + <testcase name="parent 2 > child 1" classname="./main.ts" time="[WILDCARD]" line="9" col="11"> + <failure message="1 test step failed">1 test step failed.</failure> + </testcase> + <testcase name="parent 2 > child 1 > grandchild 1" classname="[WILDCARD]/main.ts" time="[WILDCARD]" line="10" col="13"> + </testcase> + <testcase name="parent 2 > child 1 > grandchild 2" classname="[WILDCARD]/main.ts" time="[WILDCARD]" line="11" col="13"> + <failure message="Uncaught Error: Fail.">Error: Fail. + throw new Error("Fail."); + ^ + at file:///[WILDCARD]/main.ts:12:13 + [WILDCARD]</failure> + </testcase> + <testcase name="parent 2 > child 2" classname="./main.ts" time="[WILDCARD]" line="15" col="11"> + <failure message="Uncaught Error: Fail.">Error: Fail. + throw new Error("Fail."); + ^ + at file:///[WILDCARD]/main.ts:16:11 + [WILDCARD]</failure> + </testcase> + <testcase name="parent 3 > child 1" classname="./main.ts" time="[WILDCARD]" line="21" col="11"> + </testcase> + <testcase name="parent 3 > child 2" classname="./main.ts" time="[WILDCARD]" line="22" col="11"> + </testcase> + </testsuite> +</testsuites> +error: Test failed diff --git a/tests/specs/test/junit_nested/main.ts b/tests/specs/test/junit_nested/main.ts new file mode 100644 index 000000000..128e48aef --- /dev/null +++ b/tests/specs/test/junit_nested/main.ts @@ -0,0 +1,23 @@ +Deno.test("parent 1", async (t) => { + await t.step("child 1", () => {}); + await t.step("child 2", () => { + throw new Error("Fail."); + }); +}); + +Deno.test("parent 2", async (t) => { + await t.step("child 1", async (t) => { + await t.step("grandchild 1", () => {}); + await t.step("grandchild 2", () => { + throw new Error("Fail."); + }); + }); + await t.step("child 2", () => { + throw new Error("Fail."); + }); +}); + +Deno.test("parent 3", async (t) => { + await t.step("child 1", () => {}); + await t.step("child 2", () => {}); +}); |
