Skip to content

Commit 65111b2

Browse files
committed
tweak message
1 parent e5f5c11 commit 65111b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/jest-transform/src/enhanceUnexpectedTokenMessage.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ export function enhanceUnexpectedTokenMessage(e: Error): Error {
3535
e.stack =
3636
`${chalk.bold.red('Jest encountered an unexpected token')}
3737
38-
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
38+
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
3939
40-
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
40+
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
41+
42+
By default "node_modules" folder is ignored by transformers.
4143
4244
Here's what you can do:
4345
${DOT}If you are trying to use ECMAScript Modules, see ${chalk.underline(

0 commit comments

Comments
 (0)