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 for Workers using 
SELF↗ - Basic unit and integration tests for Pages Functions using 
SELF↗ - Basic integration tests using an auxiliary Worker ↗
 - Basic integration test for Workers with static assets ↗
 - 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 ↗
 - Integration test with static assets and Puppeteer ↗
 - Resolving modules with Vite Dependency Pre-Bundling ↗