1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00
denoland-deno/cli/tests/exit_sanitizer_test.ts
Casper Beyer 9cc7e32e37
feat: add exit sanitizer to Deno.test (#9529)
This adds an exit sanitizer to ensure that code being tested or 
dependencies of that code can't accidentally call "Deno.exit"
leading to partial test runs and false results.
2021-02-24 13:55:50 +01:00

11 lines
167 B
TypeScript

Deno.test("exit(0)", function () {
Deno.exit(0);
});
Deno.test("exit(1)", function () {
Deno.exit(1);
});
Deno.test("exit(2)", function () {
Deno.exit(2);
});