Skip to content

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

@chrisbreiding

Description

@chrisbreiding

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+

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions