diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-02-24 20:55:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-24 13:55:50 +0100 |
commit | 9cc7e32e37e6708980abc051f2cb71526c175d88 (patch) | |
tree | 42728035073e98745ebd022c6788ba4d4ba520fd /cli/tests/integration_tests.rs | |
parent | dc3683c7a433bf44656063c9eee87709fbe1e7d4 (diff) |
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.
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r-- | cli/tests/integration_tests.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index d47c8d1e9..78cecf2fb 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -2252,6 +2252,12 @@ mod integration { assert!(out.contains("test result: FAILED. 1 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out")); } + itest!(test_exit_sanitizer { + args: "test exit_sanitizer_test.ts", + output: "exit_sanitizer_test.out", + exit_code: 1, + }); + itest!(stdout_write_all { args: "run --quiet stdout_write_all.ts", output: "stdout_write_all.out", |