Jest source maps not working
See original GitHub issueHey there!
I’m pretty new to TypeScript/jest and I spent hours in figuring out why line numbering in failing tests are wrong so please bear with me.
I’m not sure if I missed something or it’s an actual bug and I couldn’t find anything close to my problem online. When running install()
, line numbering breaks, when commenting it out, everything works fine (but of course stack traces don’t work any more). It doesn’t matter if install()
is run in test code or in imported production code, test line numbering always breaks.
I have set up a demo repo over here.
Thanks for your help!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10
Top Results From Across the Web
How to configure source maps when using Jest within Visual ...
I have tried setting the sourceMaps prop to both true and inline and both did not work with current launch.json configuration. Here is...
Read more >@jest/source-map | Yarn - Package Manager
Fixed change events to be emitted in jest-haste-map's watch mode. This fixes issues with Jest's new watch mode and react-native-packager. Fixed cli arguments...
Read more >@jest/source-map - npm Package Health Analysis | Snyk
The npm package @jest/source-map was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >@jest/source-map - npm
Start using @jest/source-map in your project by running `npm i @jest/source-map`. ... This package does not have a README.
Read more >Configuring Jest
The Jest philosophy is to work great by default, but sometimes you just need ... Node.js core modules, like fs , are not...
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
as a workaround:
until this issue is fixed.
also, https://github.com/evanw/esbuild has impact as well because of this issue. probably https://github.com/swc-project/swc also.
I just tested 0.5.0 and 0.5.18 and they both have the same problem.