summaryrefslogtreecommitdiff
path: root/runtime/js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js')
-rw-r--r--runtime/js/40_testing.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js
index 2ec60ca44..2c2b55d56 100644
--- a/runtime/js/40_testing.js
+++ b/runtime/js/40_testing.js
@@ -173,13 +173,16 @@
preOp.opsCompletedAsync;
if (dispatchedDiff > completedDiff) {
- const [name, hint] = OP_DETAILS[key];
+ const [name, hint] = OP_DETAILS[key] || [key, null];
const count = dispatchedDiff - completedDiff;
let message = `${count} async operation${
count === 1 ? "" : "s"
} to ${name} ${
count === 1 ? "was" : "were"
- } started in this test, but never completed. This is often caused by not ${hint}.`;
+ } started in this test, but never completed.`;
+ if (hint) {
+ message += ` This is often caused by not ${hint}.`;
+ }
const traces = [];
for (const [id, { opName, stack }] of postTraces) {
if (opName !== key) continue;