From 4c36fa1fdf6c353fb01f2ec80da39a52e969fb5f Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Wed, 1 Dec 2021 15:22:11 +0100 Subject: [PATCH] chore: Fix typo in no-pending-ops error message (#12948) --- cli/tests/testdata/test/unresolved_promise.out | 2 +- cli/tests/testdata/top_level_await_circular.out | 2 +- cli/tests/testdata/top_level_await_unresolved.out | 2 +- core/runtime.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/tests/testdata/test/unresolved_promise.out b/cli/tests/testdata/test/unresolved_promise.out index 4e5c20a3bc..60f9e3d242 100644 --- a/cli/tests/testdata/test/unresolved_promise.out +++ b/cli/tests/testdata/test/unresolved_promise.out @@ -2,4 +2,4 @@ Check [WILDCARD]/test/unresolved_promise.ts test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) -error: Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promise. +error: Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promises. diff --git a/cli/tests/testdata/top_level_await_circular.out b/cli/tests/testdata/top_level_await_circular.out index fcbc001c3f..72072071ed 100644 --- a/cli/tests/testdata/top_level_await_circular.out +++ b/cli/tests/testdata/top_level_await_circular.out @@ -4,6 +4,6 @@ timeout loop 2 timeout loop 3 timeout loop 4 timeout loop 5 -error: Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promise. +error: Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promises. Pending dynamic modules: - [WILDCARD]/tla3/b.js diff --git a/cli/tests/testdata/top_level_await_unresolved.out b/cli/tests/testdata/top_level_await_unresolved.out index 77395f5d02..d5291f833d 100644 --- a/cli/tests/testdata/top_level_await_unresolved.out +++ b/cli/tests/testdata/top_level_await_unresolved.out @@ -1 +1 @@ -error: Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promise. +error: Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promises. diff --git a/core/runtime.rs b/core/runtime.rs index d80518de68..5db11d9c5a 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -841,7 +841,7 @@ impl JsRuntime { { // pass, will be polled again } else { - let msg = "Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promise."; + let msg = "Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promises."; return Poll::Ready(Err(generic_error(msg))); } } @@ -854,7 +854,7 @@ impl JsRuntime { { // pass, will be polled again } else if state.dyn_module_evaluate_idle_counter >= 1 { - let mut msg = "Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promise. + let mut msg = "Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promises. Pending dynamic modules:\n".to_string(); for pending_evaluate in &state.pending_dyn_mod_evaluate { let module_info = module_map