Skip to content

Commit cdfb384

Browse files
richardthe3rdclaudeCopilot
authored
chore(worker): upgrade @cloudflare/vitest-pool-workers to v0.16 and vitest to v4 (#284)
* chore(worker): upgrade @cloudflare/vitest-pool-workers to v0.16 + vitest to v4 Migrates the Cloudflare Worker test setup from vitest 3.x / pool-workers 0.8.x to vitest 4.x / pool-workers 0.16.x: - package.json: bump @cloudflare/vitest-pool-workers ^0.8→^0.16, vitest ^3→^4.1; add "type":"module" (required for vitest 4/rolldown to load the ESM config file) - vitest.config.js: replace defineWorkersConfig({test:{poolOptions:{…}}}) with defineConfig({plugins:[cloudflareTest(…)]}) per the v3→v4 codemod - proxy.test.js / beverage-types.test.js: replace fetchMock (removed from cloudflare:test in 0.16) with vi.stubGlobal('fetch', vi.fn()) and mockResolvedValueOnce/mockRejectedValueOnce; all 56 tests pass Part of #242 (slices 2 and 3). * test(worker): assert upstream URL in every proxied fetch call Each stubbed-fetch test now verifies the exact upstream URL the worker constructs, restoring the URL-validation coverage that fetchMock's intercept({ path }) provided implicitly. * test(worker): assert full upstream fetch args in worker tests Agent-Logs-Url: https://github.com/richardthe3rd/cambridge-beer-festival-app/sessions/0c00ccf3-adc6-477f-818c-0327541020c6 Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
1 parent 0980476 commit cdfb384

5 files changed

Lines changed: 1043 additions & 2177 deletions

File tree

0 commit comments

Comments
 (0)