File tree Expand file tree Collapse file tree
packages/jest-message-util/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88'use strict' ;
99
1010// eslint-disable-next-line no-throw-literal
11- throw { stack : 42 } ;
11+ throw { stack : 42 } ;
Original file line number Diff line number Diff line change @@ -391,7 +391,10 @@ export const separateMessageFromStack = (
391391 // If the error is a plain "Error:" instead of a SyntaxError or TypeError we
392392 // remove the prefix from the message because it is generally not useful.
393393 const ERROR_REGEXP = / ^ (?: E r r o r : ) ? ( [ \s \S ] * ?(? = \n \s * a t \s .* : \d * : \d * ) | \s * .* ) ( [ \s \S ] * ) $ / ;
394- const messageMatch = typeof content !== 'string' ? `${ content } ` . match ( ERROR_REGEXP ) : content . match ( ERROR_REGEXP ) ;
394+ const messageMatch =
395+ typeof content !== 'string'
396+ ? `${ content } ` . match ( ERROR_REGEXP )
397+ : content . match ( ERROR_REGEXP ) ;
395398 if ( ! messageMatch ) {
396399 // For typescript
397400 throw new Error ( 'If you hit this error, the regex above is buggy.' ) ;
You can’t perform that action at this time.
0 commit comments