-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
err.stack = jsonStats.errors.join('\n\n') | ||
err.message += `\n${jsonStats.errors | ||
// remove stack trace lines since they're useless for debugging | ||
.map((err) => err.replace(/\n\s*at.*/g, '').replace(/From previous event:\n?/g, '')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this same logic is used in test runner to strip stack trace lines, so we're just moving this logic up
https://github.com/cypress-io/cypress/blob/master/packages/server/lib/plugins/preprocessor.coffee#L16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ughh, this is so so weird - why have 3 lines of code inside a string template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint auto-fixed to that when i tried to add '\n'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
I have noticed this says "fix:" but does not reference an issue and does not have a test |
snapshot is updated, but I'll add an assertion and open an issue |
…cessor#63) * append error to error.message instead of stack
append error to error.message instead of error.stack
Error: Webpack Compilation Error
not showing up in the errore.originalStack
unnecessaryfix #64