Skip to content

Commit

Permalink
make the syntax error message more helpful for TS users (#11807)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexagonrecursion authored Sep 20, 2021
1 parent 31cad20 commit 6175fa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### Features

- `[jest-transform]` Improve the unexpected token error message. ([#11807](https://github.com/facebook/jest/pull/11807))

### Fixes

- `[jest-runtime]` Fix regression when using `jest.isolateModules` and mocks ([#11882](https://github.com/facebook/jest/pull/11882))
Expand Down
3 changes: 3 additions & 0 deletions packages/jest-transform/src/enhanceUnexpectedTokenMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ Here's what you can do:
${DOT}If you are trying to use ECMAScript Modules, see ${chalk.underline(
'https://jestjs.io/docs/ecmascript-modules',
)} for how to enable it.
${DOT}If you are trying to use TypeScript, see ${chalk.underline(
'https://jestjs.io/docs/getting-started#using-typescript',
)}
${DOT}To have some of your "node_modules" files transformed, you can specify a custom ${chalk.bold(
'"transformIgnorePatterns"',
)} in your config.
Expand Down

0 comments on commit 6175fa1

Please sign in to comment.