Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in jest are not at proper line number #1024

Open
toolness opened this issue Feb 14, 2018 · 2 comments
Open

Errors in jest are not at proper line number #1024

toolness opened this issue Feb 14, 2018 · 2 comments

Comments

@toolness
Copy link
Contributor

Something is funky with the way Jest is tracing errors back to their source. I think it may be getting the line number at some point in transpilation, rather than at the original source, but I'm not sure:

lol

In the above screenshot, an error with the message LOL has been thrown at line 13 of a file, but jest seems to think it was thrown at line 10, which is confusing.

@toolness
Copy link
Contributor Author

Uhh, what's even weirder is that in the above code, the LOL error wasn't even supposed to be thrown--somehow Jest was using stale code for at least one of my modules. Completely quitting Jest and re-starting it made all my tests run without error.

@cmc333333
Copy link
Contributor

Might be worth trying out ts-jest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants