summaryrefslogtreecommitdiff
path: root/tests/testdata/test/steps/ignored_steps.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata/test/steps/ignored_steps.ts')
-rw-r--r--tests/testdata/test/steps/ignored_steps.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/testdata/test/steps/ignored_steps.ts b/tests/testdata/test/steps/ignored_steps.ts
new file mode 100644
index 000000000..102b481fb
--- /dev/null
+++ b/tests/testdata/test/steps/ignored_steps.ts
@@ -0,0 +1,16 @@
+Deno.test("ignored step", async (t) => {
+ let result = await t.step({
+ name: "step 1",
+ ignore: true,
+ fn: () => {
+ throw new Error("Fail.");
+ },
+ });
+ if (result !== false) throw new Error("Expected false.");
+ result = await t.step({
+ name: "step 2",
+ ignore: false,
+ fn: () => {},
+ });
+ if (result !== true) throw new Error("Expected true.");
+});