Skip to content

fix(vitest): initialize snapshot state only once for each file suite#4796

Merged
sheremet-va merged 10 commits intovitest-dev:mainfrom
hi-ogawa:fix-snapshot-concurrent-startCurrentRun-v2
Dec 28, 2023
Merged

fix(vitest): initialize snapshot state only once for each file suite#4796
sheremet-va merged 10 commits intovitest-dev:mainfrom
hi-ogawa:fix-snapshot-concurrent-startCurrentRun-v2

Conversation

@hi-ogawa
Copy link
Copy Markdown
Collaborator

@hi-ogawa hi-ogawa commented Dec 22, 2023

Description

Closes #4782
Closes #3361
Closes #4793 (Alternative PR)

I felt the problem is more on how VitestTestRunner uses SnapshotClient than SnapshotClient.startCurrentRun itself, so I attempted an alternative approach to fix VitestTestRunner side.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Loading
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.

Snapshots broken when using concurrent and local context Having other tests in describe.concurrent block causes snapshots to be deleted

2 participants