Skip to content

Point workers-best-practices Vitest guidance at @cloudflare/vitest-plugin - #280

Merged
irvinebroque merged 1 commit into
cloudflare:mainfrom
nu11waredev:workers-best-practices-vitest-plugin
Nov 10, 2026
Merged

irvinebroque merged 1 commit into
cloudflare:mainfrom
nu11waredev:workers-best-practices-vitest-plugin

Conversation

@nu11waredev

Copy link
Copy Markdown
Contributor

The Development & Testing section of workers-best-practices/references/runtime-patterns.md still names @cloudflare/vitest-pool-workers in its heading and its Check line, and its example imports env from cloudflare:test. #121 updated the other Vitest references for #90 but not this file.

Changes:

  • Heading and Check line name @cloudflare/vitest-plugin, with a pointer to the migration guide (markdown route).
  • "the Vitest pool" becomes "the Vitest integration" in the nodejs_compat pitfall.
  • The example imports env from cloudflare:workers; the plugin's types mark the cloudflare:test export deprecated.

Checked against Migrate to Vitest plugin. The example, unchanged otherwise, passes as written (2 tests) with a MY_KV binding on @cloudflare/vitest-plugin 1.6.1 and vitest 4.1.12. The nodejs_compat pitfall still holds on 1.6.1: a Worker importing node:buffer without the flag passes its test.

@irvinebroque
irvinebroque merged commit cbf893b into cloudflare:main Nov 10, 2026
1 check passed
@nu11waredev
nu11waredev deleted the workers-best-practices-vitest-plugin branch November 11, 2026 22:28
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.

2 participants