summaryrefslogtreecommitdiff
path: root/cli/tools/test/mod.rs
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-12-13 08:07:26 -0700
committerGitHub <noreply@github.com>2023-12-13 08:07:26 -0700
commit76a6ea57753be420398d3eba8f313a6c98eab8c3 (patch)
tree66c95d582b711aa4f4234943f5526b98c8176210 /cli/tools/test/mod.rs
parent461ef6bdd80347caa12934c2c16337bc8d40d9a4 (diff)
refactor(cli): update to new deno_core promise/call methods (#21519)
Diffstat (limited to 'cli/tools/test/mod.rs')
-rw-r--r--cli/tools/test/mod.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs
index 840c5ac87..fe1d6cc9c 100644
--- a/cli/tools/test/mod.rs
+++ b/cli/tools/test/mod.rs
@@ -498,12 +498,9 @@ async fn test_specifier_inner(
if let Some(coverage_collector) = coverage_collector.as_mut() {
worker
.js_runtime
- .with_event_loop(
+ .with_event_loop_future(
coverage_collector.stop_collecting().boxed_local(),
- PollEventLoopOptions {
- wait_for_inspector: false,
- ..Default::default()
- },
+ PollEventLoopOptions::default(),
)
.await?;
}
@@ -574,11 +571,18 @@ pub async fn run_tests_for_worker(
// but haven't responded to settle.
let waker = noop_waker();
let mut cx = Context::from_waker(&waker);
- let _ = worker.js_runtime.poll_event_loop(&mut cx, false);
+ let _ = worker
+ .js_runtime
+ .poll_event_loop(&mut cx, PollEventLoopOptions::default());
}
let earlier = SystemTime::now();
- let result = match worker.js_runtime.call_and_await(&function).await {
+ let call = worker.js_runtime.call(&function);
+ let result = match worker
+ .js_runtime
+ .with_event_loop_promise(call, PollEventLoopOptions::default())
+ .await
+ {
Ok(r) => r,
Err(error) => {
if error.is::<JsError>() {