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