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/parallel_output/main.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/specs/test/parallel_output/main.ts (limited to 'tests/specs/test/parallel_output/main.ts') diff --git a/tests/specs/test/parallel_output/main.ts b/tests/specs/test/parallel_output/main.ts new file mode 100644 index 000000000..5de733aad --- /dev/null +++ b/tests/specs/test/parallel_output/main.ts @@ -0,0 +1,27 @@ +Deno.test("step output", async (t) => { + await t.step("step 1", () => {}); + await t.step("step 2", () => {}); + await t.step("step 3", () => { + console.log("Hello, world! (from step 3)"); + }); + await t.step("step 4", () => { + console.log("Hello, world! (from step 4)"); + }); +}); + +Deno.test("step failures", async (t) => { + await t.step("step 1", () => {}); + await t.step("step 2", () => { + throw new Error("Fail."); + }); + await t.step("step 3", () => Promise.reject(new Error("Fail."))); +}); + +Deno.test("step nested failure", async (t) => { + await t.step("step 1", async (t) => { + await t.step("inner 1", () => {}); + await t.step("inner 2", () => { + throw new Error("Failed."); + }); + }); +}); -- cgit v1.2.3