1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-15 03:48:02 -05:00
denoland-deno/cli/tests/testdata/test/ops_sanitizer_step_leak.ts

11 lines
280 B
TypeScript
Raw Normal View History

Deno.test("timeout", async (t) => {
const timer = setTimeout(() => {
console.log("timeout");
}, 10000);
clearTimeout(timer);
await t.step("step", async () => {
await new Promise<void>((resolve) => setTimeout(() => resolve(), 10));
});
console.log("done");
});