mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 04:51:22 +00: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
@ -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 New Issue
Block a user