Stack trace with wrong line number
See original GitHub issue🐛 Bug Report
Promise-based test (maybe not only promise-based) fails with wrong stack trace (jest points to wrong line number). Maybe this issue somehow related to https://github.com/facebook/jest/issues/6108 or https://github.com/facebook/jest/issues/6556 or https://github.com/facebook/jest/issues/6424, but I can reproduce this bug with and without watch mode.
To Reproduce
Don’t know what exactly causes this issue. Simply run yarn jest
or yarn jest --watch
Expected behavior
Jest will point to right line that caused error.
Link to repl or repo (highly encouraged)
Here is repo with buggy test.
Run npx envinfo --preset jest
npx: installed 1 in 1.425s
System:
OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Binaries:
Node: 8.12.0 - /usr/bin/node
Yarn: 1.12.3 - /usr/bin/yarn
npm: 6.4.1 - /usr/bin/npm
npmPackages:
jest: ^23.6.0 => 23.6.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
c# - Wrong line numbers in stack trace
If the behavior is still the same (wrong line number) then you know it has something to do with your project / build...
Read more >StackTrace incorrect line number - MSDN - Microsoft
It means the .pdb file is not the same version as the dll. Build the project using the debug configuration then deploy the...
Read more >Wrong exception line number in stack trace in release mode
When I checked line 61, there was no possibility of error at all, only a prototype class was created on line 61. A...
Read more >Line numbers are incorrect in exception stack trace : KT-8628
A .class file with inline functions contains code from many source files, and when the JVM is generating a stacktrace, there is no...
Read more >Protrace ABL stack shows wrong line number either ...
The ABL Stack Trace in the protrace file shows a very large number that does not correspond to the r-code: 4294967295 is what...
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
@SimenB It is indeed the case. Looks like the bug was introduced in
source-map-support
by this pull request. I have created the pull request to fix it. It should also address https://github.com/facebook/jest/issues/6424.@rickhanlonii thanks! If I can help somehow please write me, because this bug annoys me too much 😃