mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04:00
16 lines
381 B
TypeScript
16 lines
381 B
TypeScript
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.");
|
|
});
|