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

Wrong line number in stack trace #6108

Closed
randing89 opened this issue May 2, 2018 · 2 comments
Closed

Wrong line number in stack trace #6108

randing89 opened this issue May 2, 2018 · 2 comments

Comments

@randing89
Copy link
Contributor

I've tried to reproduce this issue with minimum code in https://github.com/randing89/line-number-bug

The line number is incorrect unless retainLines was set in .babelrc. However, I don't think it is expected as babel-jest has already set the sourceMaps to both in https://github.com/facebook/jest/blob/master/packages/babel-jest/src/index.js#L78

It looks like the exception thrown out from https://github.com/facebook/jest/blob/master/packages/jest-runtime/src/index.js#L555 was not transformed with source map. Or maybe I just crewed up with the configuration.

Screenshot:
image

System info:

npx: installed 1 in 1.62s

  System:
    OS: macOS High Sierra 10.13.4
    CPU: x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  Binaries:
    Node: 10.0.0 - ~/.nvm/versions/node/v10.0.0/bin/node
    Yarn: 1.5.1 - ~/.yarn/bin/yarn
    npm: 5.6.0 - ~/.nvm/versions/node/v10.0.0/bin/npm
  npmPackages:
    jest: ^22.4.3 => 22.4.3 
@SimenB
Copy link
Member

SimenB commented May 2, 2018

This is a duplicate of #5925, which has been fixed in master.

See screenshot with a build of jest in master with your reproduction:
image

It might be reverted in #6106 because of a mem-leak though, but we'll attempt to bring it back ASAP if that lands.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants