diff options
author | Luca Casonato <hello@lcas.dev> | 2022-02-16 19:53:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 19:53:17 +0100 |
commit | 53088e16de9728696df12b04670a0f2d5203592b (patch) | |
tree | 74df68fc3f39db638db6431580d03c235a8f5ff4 /cli/tools | |
parent | b98afb59ae43b4fcfc2bf06e82942005d7f68c7b (diff) |
feat(test): improved op sanitizer errors + traces (#13676)
This commit improves the error messages for the `deno test` async op
sanitizer. It does this in two ways:
- it uses handwritten error messages for each op that could be leaking
- it includes traces showing where each op was started
This "async op tracing" functionality is a new feature in deno_core.
It likely has a significant performance impact, which is why it is only
enabled in tests.
Diffstat (limited to 'cli/tools')
-rw-r--r-- | cli/tools/test.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/tools/test.rs b/cli/tools/test.rs index 5d99677f2..101dcb6b6 100644 --- a/cli/tools/test.rs +++ b/cli/tools/test.rs @@ -475,6 +475,12 @@ async fn test_specifier( None }; + // Enable op call tracing in core to enable better debugging of op sanitizer + // failures. + worker + .execute_script(&located_script_name!(), "Deno.core.enableOpCallTracing();") + .unwrap(); + // We only execute the specifier as a module if it is tagged with TestMode::Module or // TestMode::Both. if mode != TestMode::Documentation { |