Recipes
Recipes are examples that help demonstrate how to write unit tests and integration tests for Workers projects using the @cloudflare/vitest-pool-workers
↗ package.
- Basic unit and integration tests using
SELF
↗ - Basic integration tests using an auxiliary Worker ↗
- Isolated tests using KV, R2 and the Cache API ↗
- Isolated tests using D1 with migrations ↗
- Isolated tests using Durable Objects with direct access ↗
- Tests using Queue producers and consumers ↗
- Tests using Hyperdrive with a Vitest managed TCP server ↗
- Tests using declarative/imperative outbound request mocks ↗
- Tests using multiple auxiliary Workers and request mocks ↗
- Tests importing WebAssembly modules ↗
- Tests using JSRPC with entrypoints and Durable Objects ↗
- Basic integration test for a Worker with static assets ↗
- Integration test with static assets and Puppeteer ↗