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

fix(vite-dev-server): only re-run tests when specs deps are updated #16215

Merged
merged 6 commits into from
Apr 28, 2021

Conversation

elevatebart
Copy link
Contributor

@elevatebart elevatebart commented Apr 26, 2021

User facing changelog

Only re-runs the tests, when one of the dependency of the specs is updated, instead of every file in the project.

Additional details

Before this PR, the active spec was re-run when any file within the project, text or not, was created, modified or deleted. This could trigger some infinite loops when creating for example snapshots or screenshots. Now cypress . Slight issue, but much better

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 26, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Apr 27, 2021



Test summary

4033 0 49 2Flakiness 0


Run details

Project cypress
Status Passed
Commit 88a090c
Started Apr 28, 2021 4:35 PM
Ended Apr 28, 2021 4:46 PM
Duration 11:26 💡
OS Linux Debian - 10.8
Browser Chrome 89

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@elevatebart elevatebart marked this pull request as ready for review April 27, 2021 03:28
@lmiller1990 lmiller1990 self-requested a review April 27, 2021 03:33
lmiller1990
lmiller1990 previously approved these changes Apr 27, 2021
@lmiller1990
Copy link
Contributor

The code looks fine. I did not test it yet, so let's hold of merging until we give it a bit of a test.

Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's check for:

  • circular imports
  • add a check to bail out of potential infinite loop
  • general testing

@lmiller1990 lmiller1990 self-requested a review April 27, 2021 04:08
@lmiller1990 lmiller1990 dismissed stale reviews from ghost and themself via 584bf8a April 27, 2021 04:18
@lmiller1990
Copy link
Contributor

  1. Added a test for circular imports. Seems okay.
  2. Tested it out. It's so fast for our code-bases (we don't have a huge code-base to test it on - just the demo code-base).
  3. Creating/modifying a file in the cypress/components directory does not cause a re-run or update. Great!

Probably not related to this PR but I could not test with npm/design-system. Seems the project is entirely broken. I don't know when this happened. This should be failing on CI.

image

@lmiller1990
Copy link
Contributor

The error in the screenshot above is also in develop. Not introduced here. I made an issue: #16241

@agg23 agg23 self-requested a review April 28, 2021 16:34
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

Successfully merging this pull request may close these issues.

vite-dev-server: Prevent re-running the test when files that are not in a test's dependency tree are modified
3 participants