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

ignoreTestFiles is ignored when passed from cli #1696

Sergeon opened this issue May 9, 2018 · 8 comments

ignoreTestFiles is ignored when passed from cli #1696

Sergeon opened this issue May 9, 2018 · 8 comments


Copy link

@Sergeon Sergeon commented May 9, 2018

Current behavior:

When invoking cypress with config ignoreTestFiles=*blob from the command line, specs that match the blob aren't ignored. For instance, this npm command:

"cypress:run": "cypress run --config ignoreTestFiles=*.demo.js"

Will make a spec.demo.js to run, when it should be ignored.

Desired behavior:

Files that match the ignoreTestFiles parameter should be ignored.

Steps to reproduce:

I set up a test-tiny-repo clone with a demo of the issue. The branch is called ignore-test-files-cli-issue. You can find the repo here.

The readme has all the instructions.


Mac Os: 10.13.4
Cypress: 2.1

Copy link

@ValerieThoma ValerieThoma commented May 9, 2018

Thank you for taking the time to provide this excellent example.
I was able to reproduce what you described.
Passing ignoreTestFiles as a CLI argument does not work as the documentation suggests: cypress-io/cypress-documentation#535
We believe this is a bug.

Copy link

@brian-mann brian-mann commented Aug 2, 2018

You need to quote ignoreTestFiles.

"cypress:run": "cypress run --config ignoreTestFiles='*.demo.js'"

Whenever you use a bare glob from the command line, by default the terminal will attempt to expand it and it will not work.

Also, I don't believe your glob is right anyway. It should likely be **/*.demo.js since it will be passed the absolute path.

Copy link

@Sergeon Sergeon commented Aug 2, 2018

Hi @brian-mann, thank you for your suggestion.

However, both

"cypress:run": "cypress run --config ignoreTestFiles='*.demo.js'"


"cypress:run": "cypress run --config ignoreTestFiles='**/*.demo.js'"

Still run the demo spec. I updated the demonstration repo with the new npm commands.

Copy link

@felixkempf felixkempf commented Apr 17, 2019

This issue unfortunately still exists in cypress 3.2.0

Also I found it rather confusing that even when successfully configuring ignoreTestFiles via config file and running cypress:open, the configured ignoreTestFiles are not shown under "Settings > Configuration".

Copy link

@jennifer-shehane jennifer-shehane commented Apr 18, 2019

I think this PR may fix this issue #3880 Can anyone verify?

Copy link

@brianmcgue brianmcgue commented Apr 18, 2019

#3880 does seem to fix this issue for me.

Copy link

@cypress-bot cypress-bot bot commented May 24, 2019

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

Copy link

@cypress-bot cypress-bot bot commented Jun 27, 2019

Released in 3.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

7 participants