-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Sourcemaps point to wrong line number in Cypress in TypeScript version 5 #28483
Comments
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
The line numbers of assertions errors in run mode are still incorrect. |
@TimVee or anyone else following this issue, I've been spending some time looking into this and I'm not able to reproduce this with a couple of scenarios I've tried. Do you have a minimal example of this failing for you that I can take a look at? |
I could reproduce it easily:
I added the error on line 24, but in the Cypress test runner that becomes line 21: |
@TimVee This issue seems different from the original issue - which is that NO stack trace is available for viewing in the error. I do see this being a problem though, that the lines are off sometimes. I think we'll update this issue to track that since the other situation hasn't been demonstrated. |
Current behavior
Sourcemaps point to the wrong line number in some version of TS 5.
*Note: There were some earlier reports of the stack trace not displaying at all in an error, but this was never reproducible.
Desired behavior
In order to get sourcemaps to work we have to do some monkeypatching to force the sourcemap options to generate them the way we expect. There's likely something that's changed in some version of TS 5 here.
Test code to reproduce
TS code - don't have repro
Cypress Version
13.6.1
Node version
18
Operating System
Mac
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: