[Workers] Correct cloudflare:test type path - #32705
Conversation
Review✅ No issues found in commit Code ReviewThis code review is in beta and may not always be helpful — use your judgment. No code review issues found. ConventionsNo convention issues found. Style Guide ReviewNo style-guide issues found. CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
The prose tells readers to add `@cloudflare/vitest-plugin` to the tsconfig `types` array, but that subpath resolves to the pool API declarations. The `cloudflare:test` module is declared in the package's `./types` export, which is what the example tsconfig immediately below already uses.
0325572 to
904686a
Compare
|
Rebased onto current Since then the docs moved from From the published manifest for "exports": {
".": { "types": "./dist/pool/index.d.mts" },
"./types": { "types": "./types/cloudflare-test.d.ts" }
}The root export is the pool API; The page already contradicts itself on this — the example |
904686a to
6ae9a14
Compare
Summary
The Workers Vitest setup text referenced the package root, which does not export the ambient
cloudflare:testdeclarations. It now uses@cloudflare/vitest-pool-workers/types, matching thetsconfig.jsonexample and current package exports.Fixes #30069
Validated with
pnpm run check,pnpm run format:check,pnpm run build, andpnpm run test.Documentation checklist