Error stacks are broken in Jest watch mode for source mapped files
See original GitHub issue🐛 Bug Report
Error stacks for source mapped files are not always correctly reported in watch mode.
To Reproduce
- clone https://github.com/ArtemGovorov/jest-watch-mode-source-map-issue,
- run
npm i
, - run
npm test
, - touch the
__tests__/a.spec.js
file to get the test running, - observe a correctly reported exception line,
- uncomment the second line of the test file to let Babel transform the import.
- save the file,
- observe an incorrectly reported exception line.
Expected behavior
The error stack should be correctly reported.
Link to repl or repo (highly encouraged)
https://github.com/ArtemGovorov/jest-watch-mode-source-map-issue
Run npx envinfo --preset jest
System:
OS: macOS High Sierra 10.13.3
CPU: x64 Intel(R) Xeon(R) W-2140B CPU @ 3.20GHz
Binaries:
Node: 9.6.1 - /usr/local/bin/node
Yarn: 1.6.0 - ~/.yarn/bin/yarn
npm: 6.1.0 - ~/.nvm/versions/node/v10.3.0/bin/npm
npmPackages:
jest: ^23.1.0 => 23.1.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Jest CLI Options
Watch mode also enables to specify the name or path to a file to focus on a specific set of tests. Using with...
Read more >javascript - jest - error with watch mode - Stack Overflow
I tried to check the Jest-CLI and found that the function is expecting two parameters and one of them is promise which is...
Read more >jest | Yarn - Package Manager
Fast interactive mode can switch between running all tests or only test files related to changed files.
Read more >CoffeeScript
-m, --map, Generate source maps alongside the compiled JavaScript files. ... coffee --watch --compile experimental.coffee; Concatenate a list of files into ...
Read more >How I solved and debugged my Webpack issue through trial ...
js ) and one of the source files contains an error, the stack trace will simply point to bundle.js . This isn't always...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It does happen only in watch mode. After restarting, the error is displayed correctly.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.