diff options
author | AEtheve <30652308+AEtheve@users.noreply.github.com> | 2022-04-13 14:18:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-13 14:18:12 +0200 |
commit | c03fbb3c1f58868e079a9bf21f8351ad599ea7b5 (patch) | |
tree | 7211f60beee899559239337f068249b9ccc3fb61 /runtime/js/40_testing.js | |
parent | 47e8deeaf704eb9372db5c5070455252ed0cfa79 (diff) |
fix(test): Don't error on missing op details (#14184)
Diffstat (limited to 'runtime/js/40_testing.js')
-rw-r--r-- | runtime/js/40_testing.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js index 0b75daa24..c4321c748 100644 --- a/runtime/js/40_testing.js +++ b/runtime/js/40_testing.js @@ -198,7 +198,7 @@ } ArrayPrototypePush(details, message); } else if (dispatchedDiff < completedDiff) { - const [name] = OP_DETAILS[key]; + const [name, hint] = OP_DETAILS[key] || [key, null]; const count = completedDiff - dispatchedDiff; ArrayPrototypePush( details, @@ -206,7 +206,8 @@ count === 1 ? "was" : "were" } started before this test, but ${ count === 1 ? "was" : "were" - } completed during the test. Async operations should not complete in a test if they were not started in that test.`, + } completed during the test. Async operations should not complete in a test if they were not started in that test. + ${hint ? `This is often caused by not ${hint}.` : ""}`, ); } } |