summaryrefslogtreecommitdiff
path: root/tests/testdata/test/parallel_output.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata/test/parallel_output.ts')
-rw-r--r--tests/testdata/test/parallel_output.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/testdata/test/parallel_output.ts b/tests/testdata/test/parallel_output.ts
new file mode 100644
index 000000000..5de733aad
--- /dev/null
+++ b/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.");
+ });
+ });
+});