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

Testing Module doesn't communicate properly that Vitest is unresponsive/restarting #29784

Closed
Tracked by #29531
JReinhold opened this issue Dec 2, 2024 · 1 comment · Fixed by #29829
Closed
Tracked by #29531
Assignees

Comments

@JReinhold
Copy link
Contributor

JReinhold commented Dec 2, 2024

Sometimes we're restarting Vitest, which usually takes less than a second, but during that time, triggering a run won' work, it will be ignored. This can eg. happen when you're toggling coverage and immediately trigger a run, it doesn't do anything.

What happens is:

  1. changing a config (coverage/a11y) is debounced to 2s. After that you see "Settings saved" with a green border
  2. Vitest is restarted, in that time it's unresponsive.

I see two ways to fix this:

  1. Disable the run button whenever we know that Vitest is restarting or otherwise unresponsive.
  2. Queue requests when Vitest is restarting, triggering them when Vitest is ready. We probably don't want an actual queue system for this, just "trigger the most recent action". Lining up multiple actions could create a confusing situation.

Originally reported on Discord:

Image

@ghengeveld
Copy link
Member

Seems like we may need a "starting" status. I had that implemented for the "stuck state" issue last week but didn't continue down that road because I found a simpler solution. Maybe we have a new use case for it here?

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 a pull request may close this issue.

2 participants