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

@@ -130,14 +130,9 @@ class Jasmine2Reporter {
_addMissingMessageToStack(stack, message) {
// Some errors (e.g. Angular injection error) don't prepend error.message
// to stack, instead the first line of the stack is just plain 'Error'
const ERROR_REGEX = /^Error\s*\n/;
const ERROR_REGEX = /^Error:?\s*\n/;
if (
stack &&
message &&
ERROR_REGEX.test(stack) &&
stack.indexOf(message) === -1
) {
if (stack && message && !stack.includes(message)) {
return message + stack.replace(ERROR_REGEX, '\n');
}