fix(test): do not throw on error.errors.map
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.
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) =>
