diff options
author | Luca Casonato <hello@lcas.dev> | 2023-09-14 16:38:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 16:38:15 +0200 |
commit | 851f795001a9164572d02606587ddc5193bdfd2d (patch) | |
tree | 77a129ff766013dd9ea0cb83d6a84a40e4f1f0f7 /cli/tools/test/mod.rs | |
parent | bbb348aa33b56e15f376e8e7ee7b71bd5badd936 (diff) |
fix: output traces for op sanitizer in more cases (#20494)
This adds traces for the "started outside test, closed inside test"
case.
Diffstat (limited to 'cli/tools/test/mod.rs')
-rw-r--r-- | cli/tools/test/mod.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs index 87ca7f3f5..0708e00c0 100644 --- a/cli/tools/test/mod.rs +++ b/cli/tools/test/mod.rs @@ -433,6 +433,13 @@ pub async fn test_specifier( let mut coverage_collector = worker.maybe_setup_coverage_collector().await?; + if options.trace_ops { + worker.execute_script_static( + located_script_name!(), + "Deno[Deno.internal].core.enableOpCallTracing();", + )?; + } + // We execute the main module as a side module so that import.meta.main is not set. match worker.execute_side_module_possibly_with_npm().await { Ok(()) => {} @@ -450,12 +457,7 @@ pub async fn test_specifier( } let mut worker = worker.into_main_worker(); - if options.trace_ops { - worker.js_runtime.execute_script_static( - located_script_name!(), - "Deno[Deno.internal].core.enableOpCallTracing();", - )?; - } + worker.dispatch_load_event(located_script_name!())?; let tests = { |