summaryrefslogtreecommitdiff
path: root/tests/specs/test/steps_ignored_steps/ignored_steps.ts
blob: 102b481fba08e74a0f5423aae0d8c7d85ee8cda3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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.");
});