jest
jest copied to clipboard
[Bug]: Jest failed to parse a file.
Version
29.7.0
Steps to reproduce
https://github.com/Boby900/my-testing-app.git
run the cmd npm run test
Expected behavior
I wanted to run the tests but not able to
Actual behavior
Test suite failed to run
Jest encountered an unexpected token
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.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
By default "node_modules" folder is ignored by transformers.
Additional context
No response
Environment
System:
OS: Windows 10 10.0.19045
CPU: (4) x64 Intel(R) Core(TM) i3-4160 CPU @ 3.60GHz
Binaries:
Node: 21.1.0 - C:\Program Files\nodejs\node.EXE
npm: 8.19.3 - C:\Program Files\nodejs\npm.CMD
npmPackages:
jest: ^29.7.0 => 29.7.0