From e0b9c745c15720914f14996bf357d5b375e2dbd8 Mon Sep 17 00:00:00 2001 From: HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com> Date: Mon, 16 Sep 2024 22:38:40 +0300 Subject: chore: deprecate test itests (#25512) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR is part of #22907 --------- Signed-off-by: HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com> Co-authored-by: Bartek IwaƄczuk --- tests/specs/test/junit_nested/__test__.jsonc | 5 +++ tests/specs/test/junit_nested/main.out | 47 ++++++++++++++++++++++++++++ tests/specs/test/junit_nested/main.ts | 23 ++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 tests/specs/test/junit_nested/__test__.jsonc create mode 100644 tests/specs/test/junit_nested/main.out create mode 100644 tests/specs/test/junit_nested/main.ts (limited to 'tests/specs/test/junit_nested') 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 + + + + + 1 test step failed. + + + 2 test steps failed. + + + + + + + Error: Fail. + throw new Error("Fail."); + ^ + at file:///[WILDCARD]/main.ts:4:11 + [WILDCARD] + + + 1 test step failed. + + + + + Error: Fail. + throw new Error("Fail."); + ^ + at file:///[WILDCARD]/main.ts:12:13 + [WILDCARD] + + + Error: Fail. + throw new Error("Fail."); + ^ + at file:///[WILDCARD]/main.ts:16:11 + [WILDCARD] + + + + + + + +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", () => {}); +}); -- cgit v1.2.3