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

Allow excluding certain files from cypress watch #3098

Closed
silbinarywolf opened this issue Jan 9, 2019 · 3 comments
Closed

Allow excluding certain files from cypress watch #3098

silbinarywolf opened this issue Jan 9, 2019 · 3 comments

Comments

@silbinarywolf
Copy link
Contributor

Current behavior:

The seek-oss/css-modules-typescript-loader module generates *.d.ts files as part of the Webpack build. When running this alongside Cypress, it will get caught in an infinite loop.

Desired behavior:

  1. Cypress offers config options to ignore certain files from being watched in cypress.json.
  2. Cypress could perhaps track what files were changed during the initial Webpack build process and subsequently ignore them (ie. not reload) if those files are changed again.

I've also raised an issue here to solve the problem at the other end too:

Steps to reproduce: (app code and test code)

  • Pull down this repo (my feature-improvements branch): silbinarywolf/cypress-aurelia-unit-test@4db0f8b
  • Run npm install
  • Run cypress open and run the 'box-component.test.ts'
  • You should notice that the tests pass and but the page just keeps reloading.
@kuceb
Copy link
Contributor

kuceb commented Jan 14, 2019

Hi @silbinarywolf , you should be able to use the Preprocessor API to modify how cypress watches files and reloads

Does this help?

@silbinarywolf
Copy link
Contributor Author

silbinarywolf commented Jan 14, 2019

@bkucera If documentation can be added here alongside watchForFileChanges here that explains how to ignore certain files via the preprocessor API, that'd be good. The issue was more that it wasn't immediately obvious how I can just force Cypress to ignore a certain file from being changed.

I was looking for something to turn exclude files being watched in the configuration section of the documentation.

My specific problem has been solved* in the library I mentioned above so it's up to you guys how you want to educate users on this I guess! I'm happy for this to be closed at your discretion.

  • I'm yet to pull it down and actually test it, but it looks like it should do the job

@kuceb kuceb changed the title Cypress will reload infinitely when used alongside "seek-oss/css-modules-typescript-loader" Allow excluding certain files from cypress watch Jan 15, 2019
@kuceb
Copy link
Contributor

kuceb commented Jan 18, 2019

@silbinarywolf Could you open up an issue here for the documentation changes? Feel free to leave more comments below if you have any future issues about this. Thanks!

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

No branches or pull requests

3 participants