File tree 2 files changed +1
-2
lines changed
packages/jest-transform/src
2 files changed +1
-2
lines changed Original file line number Diff line number Diff line change 15
15
- ` [jest-resolve-dependencies] ` Resolve mocks as dependencies ([ #10713 ] ( https://github.com/facebook/jest/pull/10713 ) )
16
16
- ` [jest-runtime] ` Handle file URLs in dynamic imports ([ #10744 ] ( https://github.com/facebook/jest/pull/10744 ) )
17
17
- ` [jest-transform] ` Link to ESM docs on syntax errors ([ #10748 ] ( https://github.com/facebook/jest/pull/10748 ) )
18
+ - ` [jest-transform] ` Show enhanced ` SyntaxError ` message for all ` SyntaxError ` s ([ #10749 ] ( https://github.com/facebook/jest/pull/10749 ) )
18
19
19
20
### Chore & Maintenance
20
21
Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ export default function handlePotentialSyntaxError(
23
23
if (
24
24
// `instanceof` might come from the wrong context
25
25
e . name === 'SyntaxError' &&
26
- ( e . message . includes ( 'Unexpected token' ) ||
27
- e . message . includes ( 'Cannot use import' ) ) &&
28
26
! e . message . includes ( ' expected' )
29
27
) {
30
28
throw enhanceUnexpectedTokenMessage ( e ) ;
You can’t perform that action at this time.
0 commit comments