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

Specs named with spaces have malformed stacks and no code frames for errors #7553

Closed
chrisbreiding opened this issue Jun 1, 2020 · 4 comments · Fixed by #9201
Closed

Specs named with spaces have malformed stacks and no code frames for errors #7553

chrisbreiding opened this issue Jun 1, 2020 · 4 comments · Fixed by #9201
Assignees
Labels
type: bug v4.6.0 🐛 Issue present since 4.6.0

Comments

@chrisbreiding
Copy link
Contributor

chrisbreiding commented Jun 1, 2020

Current behavior:

If a test fails or there is an error in a spec that has a space in its name, the following issues occur:

  • The error stack does not point to the user code as it should
    • This also makes it impossible to open in IDE
  • The stack line has undefined:NaN instead of <line>:<column> (edit (7/9/20): only happens in develop)
  • The code frame does not display

Screen Shot 2020-06-01 at 9 51 52 AM

Desired behavior:

Errors should display properly regardless of file naming conventions.

Test code to reproduce

  • Create a spec file with a space in its name (e.g. cypress/integration/with space_spec.js)
  • Make it fail
it('fails', () => {
  expect('actual').to.equal('expected')
})

Versions

Cypress 4.6.0+

@jennifer-shehane
Copy link
Member

@chrisbreiding I'm not able to reproduce this exactly. The stack trace still isn't pointing to my spec file, but I don't see the undefined like you do. What am I missing 🤔

4.5.0

Screen Shot 2020-07-09 at 3 20 12 PM

4.6.0+

Screen Shot 2020-07-09 at 3 18 15 PM

@chrisbreiding
Copy link
Contributor Author

The difference is I was running the develop branch and not production Cypress. I suppose the undefined part wouldn't really be seen by users, but they'd see the other issues.

@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label Jul 15, 2020
@cypress-bot cypress-bot bot added stage: work in progress and removed stage: ready for work The issue is reproducible and in scope labels Nov 16, 2020
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: work in progress labels Dec 16, 2020
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Dec 17, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 17, 2020

The code for this is done in cypress-io/cypress#9201, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@bahmutov
Copy link
Contributor

bahmutov commented Apr 7, 2021

Released in v6.2.0

@cypress-io cypress-io locked as resolved and limited conversation to collaborators May 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug v4.6.0 🐛 Issue present since 4.6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants