mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
fix(test): Don't error on missing op details (#14184)
This commit is contained in:
parent
47e8deeaf7
commit
c03fbb3c1f
1 changed files with 3 additions and 2 deletions
|
@ -198,7 +198,7 @@
|
||||||
}
|
}
|
||||||
ArrayPrototypePush(details, message);
|
ArrayPrototypePush(details, message);
|
||||||
} else if (dispatchedDiff < completedDiff) {
|
} else if (dispatchedDiff < completedDiff) {
|
||||||
const [name] = OP_DETAILS[key];
|
const [name, hint] = OP_DETAILS[key] || [key, null];
|
||||||
const count = completedDiff - dispatchedDiff;
|
const count = completedDiff - dispatchedDiff;
|
||||||
ArrayPrototypePush(
|
ArrayPrototypePush(
|
||||||
details,
|
details,
|
||||||
|
@ -206,7 +206,8 @@
|
||||||
count === 1 ? "was" : "were"
|
count === 1 ? "was" : "were"
|
||||||
} started before this test, but ${
|
} started before this test, but ${
|
||||||
count === 1 ? "was" : "were"
|
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}.` : ""}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue