summaryrefslogtreecommitdiff
path: root/cli/tools/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/test.rs')
-rw-r--r--cli/tools/test.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/tools/test.rs b/cli/tools/test.rs
index ac146fdbf..71374d94e 100644
--- a/cli/tools/test.rs
+++ b/cli/tools/test.rs
@@ -814,6 +814,13 @@ async fn test_specifier(
worker.js_runtime.resolve_value(test_result).await?;
+ loop {
+ if !worker.dispatch_beforeunload_event(&located_script_name!())? {
+ break;
+ }
+ worker.run_event_loop(false).await?;
+ }
+
worker.dispatch_unload_event(&located_script_name!())?;
if let Some(coverage_collector) = maybe_coverage_collector.as_mut() {