1
0
mirror of https://github.com/actions/labeler synced 2026-05-12 07:41:12 +02:00
This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416837 additions and 457884 deletions

View File

@@ -214,12 +214,11 @@ class Spec {
passed: false,
expected: '',
actual: '',
error:
error instanceof _assert.AssertionError
? (0, _assertionErrorMessage.default)(error, {
expand: this.expand
})
: error
error: this.isAssertionError(error)
? (0, _assertionErrorMessage.default)(error, {
expand: this.expand
})
: error
},
true
);
@@ -273,6 +272,13 @@ class Spec {
getFullName() {
return this.getSpecName(this);
}
isAssertionError(error) {
return (
error instanceof _assert.AssertionError ||
(error && error.name === _assert.AssertionError.name)
);
}
}
exports.default = Spec;