diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2022-08-04 17:38:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-04 12:38:40 -0400 |
commit | 34328690dc2090fd9282337aca1df74cbf837cab (patch) | |
tree | e2a266d39f6ab9326b10946f18c4c73a02f97185 /cli/tests/testdata/test/parallel_output.ts | |
parent | e1297b1a285801f3c3ee911ddbd0afde153a8b6f (diff) |
fix(test): output parallel test results independently (#15399)
Diffstat (limited to 'cli/tests/testdata/test/parallel_output.ts')
-rw-r--r-- | cli/tests/testdata/test/parallel_output.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cli/tests/testdata/test/parallel_output.ts b/cli/tests/testdata/test/parallel_output.ts new file mode 100644 index 000000000..5de733aad --- /dev/null +++ b/cli/tests/testdata/test/parallel_output.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."); + }); + }); +}); |