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 first-run and unsaved test runs #186

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Conversation

huwshimi
Copy link
Contributor

Done

By the time the tests have completed the TestItem reference has changed (I tried to track this down to see if there was an upstream issue that could be resolved, but couldn't identify where this was happening) so this PR updates the finished test check to use the test item's ID instead of the reference.

Before this fix the tests were given the green tick but then immediately afterwards the run.errored() call failed the test.

Fixes: #159.

QA

  • Run this branch in the development window (F5).
  • Open a test file and run a single test.
  • The test should complete and there should be no error about missing test results.
  • Modify the test (e.g. change the expected value) but DON'T save the file.
  • Run the test you modified.
  • Again, the test should complete and there should be no error about missing test results.

@huwshimi huwshimi changed the title Check for completed tests by ID instead of reference. Fix first-run and unsaved test runs Oct 16, 2023
@zxch3n zxch3n merged commit 00d6d0b into vitest-dev:main Oct 18, 2023
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.

Bug: first run error
2 participants