When running TypeScript tests, if an error occurs in a JavaScript dependency, the source map is not preserved; stack trace has line number in compiled code.
Source maps always work.
none
https://github.com/jamietre/jest-source-map-problem/tree/20b8c62b45d19ca241b181f994d3bd6d3527fe69
Possibly related issue:
I had the same issue, but fixed it using "disableSourceMapSupport": true as described in:
https://github.com/kulshekhar/ts-jest/issues/340#issuecomment-374051766
This works for the this trivial case but didn't work for my more complex case. However with this change: https://github.com/facebook/jest/pull/5945
and disableSourceMapSupport all my problems seem to go away...
@jamietre thanks for pointing that out. I'll wait for that change to be published and then check back on this issue
Jest 23 is out with the fix
Can you confirm this issue is fixed in Jest 23? @SimenB ?
no, just that the fix @jamietre said worked for them is released
This should have been fixed in latest version. If it's not the case, please re-open the issue ;-)
@huafu I just updated to [email protected] and [email protected] and everything seems to be working.
I had to change ts-jest config to "disableSourceMapSupport": false whereas before I had to have it set to true to work around the problem. So all seems good at this point.
Most helpful comment
Jest 23 is out with the fix