Skip to content

[Workers] Document Vitest plugin migration - #32858

Merged
penalosa merged 1 commit into
productionfrom
docs/vitest-plugin
Aug 20, 2026
Merged

[Workers] Document Vitest plugin migration#32858
penalosa merged 1 commit into
productionfrom
docs/vitest-plugin

Conversation

@MattieTK

Copy link
Copy Markdown
Member

Summary

Updates Workers testing documentation for the version 1 rename from @cloudflare/vitest-pool-workers to @cloudflare/vitest-plugin, including migration guidance and the codemod. Adds @msw/cloudflare as the recommended outbound-request mocking integration and a Workers changelog entry.

Sources: cloudflare/workers-sdk#15074 and cloudflare/workers-sdk#13830

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.

Validation

  • pnpm run format
  • pnpm run check
  • pnpm run format:core:check
  • pnpm run build (attempted; static rendering failed on an unrelated missing RealtimeKit generated chunk)

@github-actions github-actions Bot added product:workers Related to Workers product product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ product:changelog product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/m labels Aug 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/product-owners
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @cloudflare/product-owners, @cloudflare/ai-agents, @cloudflare/dev-plat-leads
/src/content/docs/durable-objects/ @elithrar, @rita3ko, @irvinebroque, @vy-ton, @iglesiasbrandon, @joshthoward, @danlapid, @lambrospetrou, @mikenomitch, @cloudflare/product-owners
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/product-owners, @cloudflare/wrangler, @MattieTK, @cloudflare/dev-plat-leads, @vy-ton, @cloudflare/workers-runtime-1

@github-actions

Copy link
Copy Markdown
Contributor

Preview URL: https://f50afb27.preview.developers.cloudflare.com
Preview Branch URL: https://docs-vitest-plugin.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/workers/testing/vitest-integration/mock-outbound-requests/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/testing/vitest-integration/mock-outbound-requests/
https://developers.cloudflare.com/workers/testing/vitest-integration/migration-guides/migrate-to-vitest-plugin/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/testing/vitest-integration/migration-guides/migrate-to-vitest-plugin/
https://developers.cloudflare.com/workers/testing/vitest-integration/recipes/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/testing/vitest-integration/recipes/
https://developers.cloudflare.com/changelog/post/2026-08-19-vitest-plugin/ https://docs-vitest-plugin.preview.developers.cloudflare.com/changelog/post/2026-08-19-vitest-plugin/
https://developers.cloudflare.com/workers/testing/vitest-integration/configuration/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/testing/vitest-integration/configuration/
https://developers.cloudflare.com/workers/testing/vitest-integration/write-your-first-test/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/testing/vitest-integration/write-your-first-test/
https://developers.cloudflare.com/durable-objects/examples/testing-with-durable-objects/ https://docs-vitest-plugin.preview.developers.cloudflare.com/durable-objects/examples/testing-with-durable-objects/
https://developers.cloudflare.com/workers/testing/vitest-integration/migration-guides/migrate-from-miniflare-2/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/testing/vitest-integration/migration-guides/migrate-from-miniflare-2/
https://developers.cloudflare.com/workers/testing/vitest-integration/known-issues/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/testing/vitest-integration/known-issues/
https://developers.cloudflare.com/workers/testing/vitest-integration/migration-guides/migrate-from-vitest-3-to-vitest-4/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/testing/vitest-integration/migration-guides/migrate-from-vitest-3-to-vitest-4/
https://developers.cloudflare.com/workers/testing/vitest-integration/test-apis/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/testing/vitest-integration/test-apis/
https://developers.cloudflare.com/agents/getting-started/testing-your-agent/ https://docs-vitest-plugin.preview.developers.cloudflare.com/agents/getting-started/testing-your-agent/
https://developers.cloudflare.com/workers/best-practices/workers-best-practices/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/best-practices/workers-best-practices/
https://developers.cloudflare.com/workers/testing/vitest-integration/migration-guides/migrate-from-unstable-dev/ https://docs-vitest-plugin.preview.developers.cloudflare.com/workers/testing/vitest-integration/migration-guides/migrate-from-unstable-dev/
https://developers.cloudflare.com/durable-objects/best-practices/rules-of-durable-objects/ https://docs-vitest-plugin.preview.developers.cloudflare.com/durable-objects/best-practices/rules-of-durable-objects/

@MattieTK
MattieTK marked this pull request as ready for review August 19, 2026 13:42
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Review

💡 1 suggestion found in commit f50afb2. ⚠️ Part of the review could not complete and will retry on the next push.

👉 Fix in your agent 👈
Fix the following review findings in PR #32858 (https://github.com/cloudflare/cloudflare-docs/pull/32858).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
  or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.

---

## Style Guide Review

### Suggestions (1)

#### SG-4fca45980461 · Passive voice
- **File:** `src/content/docs/workers/testing/vitest-integration/isolation-and-concurrency.mdx` line 42
- **Issue:** Line uses the passive phrase "the `nodejs_compat` flag is enabled by default."
- **Fix:** Rewrite in active voice: "because the plugin enables the `nodejs_compat` flag by default."

Code Review

This code review is in beta and may not always be helpful — use your judgment.

No code review issues found.

Conventions

❌ This review could not complete this run; results may be incomplete. It will retry on the next push.

Style Guide Review

Suggestions (1)
File Issue
workers/testing/vitest-integration/isolation-and-concurrency.mdx line 42 Passive voice — Line uses the passive phrase "the nodejs_compat flag is enabled by default." Fix: Rewrite in active voice: "because the plugin enables the nodejs_compat flag by default."
Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

@penalosa
penalosa merged commit 6a6a117 into production Aug 20, 2026
20 checks passed
@penalosa
penalosa deleted the docs/vitest-plugin branch August 20, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:changelog product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ product:workers Related to Workers product size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.