From 4c2380af5c8561fc0a5f8279c1c7336680d026ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 16 Feb 2023 14:30:14 +0100 Subject: test: add unit tests from std/node (#17794) Adds two test files: "cli/tests/unit_node/process_test.ts" and "cli/tests/unit_node/child_process_test.ts" --------- Co-authored-by: Yoshiya Hinosawa --- core/runtime.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'core') diff --git a/core/runtime.rs b/core/runtime.rs index a2b011362..25a09e85e 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -841,14 +841,7 @@ impl JsRuntime { ) .await?; let receiver = runtime.mod_evaluate(id); - poll_fn(|cx| { - let r = runtime.poll_event_loop(cx, false); - // TODO(bartlomieju): some code in readable-stream polyfill in `ext/node` - // is calling `nextTick()` during snapshotting, which causes infinite loop - runtime.state.borrow_mut().has_tick_scheduled = false; - r - }) - .await?; + runtime.run_event_loop(false).await?; receiver.await? }) .with_context(|| format!("Couldn't execute '{}'", file_source.specifier)) -- cgit v1.2.3