diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-03-23 00:24:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 00:24:45 +0100 |
commit | c3f306d7782a30440435d4b3493a9f681bb31e09 (patch) | |
tree | ad5e823d0b09f21eb43ef5558c8037618dd72a6e /runtime/js/40_testing.js | |
parent | 85c60d23f2b0ec7e2240e91bbddcc054379ec2da (diff) |
fix(test): don't error on missing op details (#14074)
Diffstat (limited to 'runtime/js/40_testing.js')
-rw-r--r-- | runtime/js/40_testing.js | 7 |
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; |