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

In watch mode, if there is a compile error, Cypress is not notified (fix included!) #380

Open
adamscybot opened this issue Mar 6, 2024 · 0 comments

Comments

@adamscybot
Copy link

adamscybot commented Mar 6, 2024

If the compilation actually fails in watch mode, Cypress just carries on using the last compiled file, which is incredibly confusing ("why aren't my changes coming through"). What is supposed to happen is it goes to the error state.

The reason this is happening is the errors array is never checked and a rejected promise is never returned.

Cypress docs state:

The callback function should return one of the following:

  • A promise* that eventually resolves the path to the built file**.
  • A promise* that eventually rejects with an error that occurred during processing.

There's a few other fixes needed where I know the solution. Especially around how its not using the promises correctly to track when the file has truly been written.

However, going to see if this PR is merged first before making the effort as unsure if this is monitored. I'm happy to help maintain this :).

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

No branches or pull requests

1 participant