mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
fix(test): do not throw on error.errors.map (#12810)
In tests, the function to format errors would assume that any error with a property `errors` would be an `AggregateError`, and therefore the property `errors` would contain an error. This is not necessarily the case.
This commit is contained in:
parent
ddfba7d8ca
commit
2dbc8fb3d5
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
const { serializePermissions } = window.__bootstrap.permissions;
|
||||
const { assert } = window.__bootstrap.util;
|
||||
const {
|
||||
AggregateError,
|
||||
ArrayPrototypeFilter,
|
||||
ArrayPrototypePush,
|
||||
ArrayPrototypeSome,
|
||||
|
@ -297,7 +298,7 @@ finishing test case.`;
|
|||
}
|
||||
|
||||
function formatError(error) {
|
||||
if (error.errors) {
|
||||
if (error instanceof AggregateError) {
|
||||
const message = error
|
||||
.errors
|
||||
.map((error) =>
|
||||
|
|
Loading…
Reference in a new issue