You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
Breakage started in 22.0.1. Possibly by this PR
When you have a class or method decorator in your typescript, then the jest line reporting is incorrect.
Unsure for exact reasons, but our package.json had the following in it which also causes this breakage. Removing the decorators causes it to start working. Leaving the decorators and removing the following from package.json also fixes it.
For unknown reasons on why we had this in our package.json, I was able to remove it and everything passes. Maybe it was necessary for something for an older version?
Now that this is removed, this issue is no longer a problem. I will leave the ticket open in case anyone feels like digging further, but feel free to close it otherwise.
Breakage started in 22.0.1. Possibly by this PR
When you have a class or method decorator in your typescript, then the jest line reporting is incorrect.
Unsure for exact reasons, but our package.json had the following in it which also causes this breakage. Removing the decorators causes it to start working. Leaving the decorators and removing the following from package.json also fixes it.
Work around:
npm install source-map-support --save-dev
In your setupTestFrameworkScriptFile, add require('source-map-support').install();
Expected behavior
The reported line error should match up with the correct line number.
Link to a minimal repo that reproduces this issue
git clone https://github.com/mikebm/jestbug.git
cd jestbug
npm install
npm test
The text was updated successfully, but these errors were encountered: