Set up Vitest with @cloudflare/vitest-pool-workers for @fedify/cfworkers
This replaces the previous test file that was always skipped with
actual working tests that run in a simulated Cloudflare Workers
runtime environment using @cloudflare/vitest-pool-workers.
Changes:
- Add wrangler.jsonc with KV and Queue bindings for testing
- Add vitest.config.ts with Workers pool configuration
- Create test/env.d.ts for TypeScript type declarations
- Create test/kv.test.ts with WorkersKvStore tests
- Create test/mq.test.ts with WorkersMessageQueue tests
- Update package.json with Vitest and Cloudflare testing dependencies
- Update deno.json to remove old test configuration
- Update @cloudflare/workers-types to ^4.20250906.0 in catalog
Note: Tests use mock Temporal.Duration objects since Cloudflare Workers
doesn't support the native Temporal API.
Co-Authored-By:
Claude Opus 4.5 <noreply@anthropic.com>
Loading
Please register or sign in to comment