Conversation
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
ascorbic
approved these changes
Feb 2, 2026
Contributor
Author
|
Thanks for the review Matt! |
This was referenced Feb 2, 2026
This was referenced Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #12346
Follow up of #12347
The code changes are courtesy of OpenCode/Opus
Summary
This PR migrates test files to use
expectfrom the local test context instead of importing it fromvitest. This change improves concurrency safety when running tests with.concurrent.Background
When running tests concurrently with Vitest, the global
expectimported fromvitestcan cause issues because it cannot reliably detect which test is running. The Vitest documentation recommends usingexpectfrom the local test context instead.Changes
Before:
After:
ESLint Rule
A new ESLint rule workers-sdk/no-vitest-import-expect was added to enforce this pattern. The rule is enabled per-package as they are migrated.
For files with complex patterns (e.g., test.each, helper functions using expect at module scope), an eslint-disable comment is added:
Migrated Packages
Remaining Packages (future PRs)
A picture of a cute animal (not mandatory, but encouraged)