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/dts/lib.deno.ns.d.ts | |
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/dts/lib.deno.ns.d.ts')
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 04bf8ad80..1627843e4 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -108,6 +108,10 @@ declare namespace Deno { * after the test has exactly the same contents as before the test. Defaults * to true. */ sanitizeResources?: boolean; + + /** Ensure the test case does not prematurely cause the process to exit, + * for example via a call to `Deno.exit`. Defaults to true. */ + sanitizeExit?: boolean; } /** Register a test which will be run when `deno test` is used on the command |