Skip to main content

property Deno.TestDefinition.sanitizeOps

Check that the number of async completed operations after the test step is the same as number of dispatched operations. This ensures that the code tested does not start async operations which it then does not await. This helps in preventing logic errors and memory leaks in the application code.

Can also be enabled globally with the --sanitize-ops CLI flag, the DENO_TEST_SANITIZE_OPS=1 environment variable, or the test.sanitizeOps option in deno.json. Can be set per-module with Deno.test.sanitizer.

Type #

boolean

Did you find what you needed?

Privacy policy