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

Evaled UserInvocationStack is sometimes off for projects using Typescript 5 #29614

Open
AtofStryker opened this issue Jun 4, 2024 · 1 comment
Labels
prevent-stale mark an issue so it is ignored by stale[bot] topic: typescript type: bug

Comments

@AtofStryker
Copy link
Contributor

AtofStryker commented Jun 4, 2024

Current behavior

Currently, when a user is running cypress commands that are wrapped inside serializable closures that throw errors, the stack trace line/column is slightly off when running typescript 5 projects. This can be seen inside our @packages/app tests when running stack trace validation when validating cy.intercept() stack errors inside reporter.command_errors.cy.ts

in cypress command log (typescript 5)

Screenshot 2024-06-03 at 2 49 17 PM

stack trace when opened in IDE (slight mismatch) (typescript 5)

Screenshot 2024-06-04 at 12 43 22 PM

This was realized when we updated the monorepo to typescript 5. see https://github.com/cypress-io/cypress/pull/29568/files#r1613972217

Desired behavior

The code snippet in the command log should match the stack trace that is visited to the user's IDE

in cypress command log (typescript 4)

Screenshot 2024-06-04 at 12 48 25 PM

stack trace when opened in IDE (slight mismatch) (typescript 4)

Screenshot 2024-06-04 at 12 48 40 PM

Test code to reproduce

see @packages/app tests when running stack trace validation when validating cy.intercept() stack errors inside reporter.command_errors.cy.ts

Cypress Version

13.10.0

Node version

v18.17.1

Operating System

macOS 14.3

Debug Logs

No response

Other

No response

@cypress-app-bot
Copy link
Collaborator

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.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Dec 2, 2024
@AtofStryker AtofStryker added prevent-stale mark an issue so it is ignored by stale[bot] and removed stale no activity on this issue for a long period labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prevent-stale mark an issue so it is ignored by stale[bot] topic: typescript type: bug
Projects
None yet
Development

No branches or pull requests

3 participants