From a0c0daac24c496e49e7c0abaae12f34723785a7d Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Tue, 29 Jun 2021 21:40:16 +0800 Subject: test(cli): harden test runner tests (#11166) --- cli/tests/test/finally_timeout.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 cli/tests/test/finally_timeout.ts (limited to 'cli/tests/test/finally_timeout.ts') diff --git a/cli/tests/test/finally_timeout.ts b/cli/tests/test/finally_timeout.ts new file mode 100644 index 000000000..dcc0a4d64 --- /dev/null +++ b/cli/tests/test/finally_timeout.ts @@ -0,0 +1,11 @@ +Deno.test("error", function () { + const timer = setTimeout(() => null, 10000); + try { + throw new Error("fail"); + } finally { + clearTimeout(timer); + } +}); + +Deno.test("success", function () { +}); -- cgit v1.2.3