1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00

test(cli): ensure clear timeout doesn't trigger sanitizers (#11396)

This commit is contained in:
Casper Beyer 2021-07-15 01:47:47 +08:00 committed by GitHub
parent 5b771e7e83
commit 844910e44f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 0 deletions

View file

@ -97,6 +97,12 @@ itest!(exit_sanitizer {
exit_code: 1, exit_code: 1,
}); });
itest!(clear_timeout {
args: "test test/clear_timeout.ts",
exit_code: 0,
output: "test/clear_timeout.out",
});
itest!(finally_timeout { itest!(finally_timeout {
args: "test test/finally_timeout.ts", args: "test test/finally_timeout.ts",
exit_code: 1, exit_code: 1,

View file

@ -0,0 +1,8 @@
Check [WILDCARD]/test/clear_timeout.ts
running 3 tests from [WILDCARD]/test/clear_timeout.ts
test test 1 ... ok ([WILDCARD])
test test 2 ... ok ([WILDCARD])
test test 3 ... ok ([WILDCARD])
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -0,0 +1,5 @@
clearTimeout(setTimeout(() => {}, 1000));
Deno.test("test 1", () => {});
Deno.test("test 2", () => {});
Deno.test("test 3", () => {});