You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
I'm trying to get Cypress integrated into an existing project and I've wired up this preprocessor up and I'm not sure what it is that it is doing or why I should use it.
I was thinking that maybe, since it allows me to pass in my existing webpack config, that it would launch the development server and all that for me, but alas it doesn't. Then I was thinking that maybe it had something to do with restarting the tests when a file is modified, but that doesn't appear to be the case either--the webpack development server does its own reload of the page inside Cypress but does not cause the tests to re-run.
Correct me if I'm wrong, but it sounds like your expectation is that it would manage your app code. The purpose of this preprocessor (and any Cypress preprocessor) is to watch and compile your test code (any .js or .coffee files that live in your cypress directory).
Out of the box (without this preprocessor), you can use modern JavaScript syntax and features (notably ES modules), so you might not need this preprocessor at all. However, we don't support experimental features out of the box, like object spread and decorators, so if you use those features in your test code (or import app code that uses those features into your test code), you may need this preprocessor to configure it to support those features.
This preprocessor will re-run you tests, but only when you change test files. Cypress doesn't really know anything about your app code or how it relates to your test code, so there's no way for us to automatically re-run tests based on your app code changing. That said, it's on our radar for us to add a mechanism enabling such functionality. Here's an issue to keep an eye on for progress on that front: cypress-io/cypress#456
I'm trying to get Cypress integrated into an existing project and I've wired up this preprocessor up and I'm not sure what it is that it is doing or why I should use it.
I was thinking that maybe, since it allows me to pass in my existing webpack config, that it would launch the development server and all that for me, but alas it doesn't. Then I was thinking that maybe it had something to do with restarting the tests when a file is modified, but that doesn't appear to be the case either--the webpack development server does its own reload of the page inside Cypress but does not cause the tests to re-run.
What am I missing?
Here's my
plugins/index.js
:I'm not sure that posting my entire webpack.config would be useful here.
Finally, is there any way to get Cypress to work in conjunction with my existing webpack development server configuration?
The text was updated successfully, but these errors were encountered: