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

Ampersand (&) in spec file causes test not to run #4210

Closed
calvinballing opened this issue May 16, 2019 · 3 comments · Fixed by #6539
Closed

Ampersand (&) in spec file causes test not to run #4210

calvinballing opened this issue May 16, 2019 · 3 comments · Fixed by #6539

Comments

@calvinballing
Copy link
Contributor

Current behavior:

The spec file in my example has an '&' in the title: capture_all_student_documents-&-forms_get_requests.spec.js
image

The dashboard lists the below error. Note the Error: Cannot find module [...] capture_all_student_documents- where the wrong filename is listed because it has been truncated immediately before the ampersand.
image

Desired behavior:

Spec files with ampersands in the filenames run without error. I have not tested other characters to see if there are other common characters which also cause errors, but if so, these other characters would also run without error.

Steps to reproduce: (app code and test code)

Name a spec file with an '&' as part of the file name. Run the spec file.

Versions

Cypress 3.2, Windows 10, Chrome

Workaround

Obviously you can rename the spec file to something without the '&', such as replacing it with 'and'.

@jennifer-shehane
Copy link
Member

Can confirm, opening a spec file with an & character errors. On OSX too.

@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label May 17, 2019
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: ready for work The issue is reproducible and in scope stage: work in progress stage: needs review The PR code is done & tested, needs review labels Feb 24, 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 Mar 3, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 5, 2020

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

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Mar 5, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 16, 2020

Released in 4.2.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.2.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants