What problem does it solve?
This Skill addresses the challenge of setting up and configuring @cloudflare/vitest-pool-workers for effective testing of Cloudflare Workers, ensuring that tests run in an environment that accurately mirrors the runtime conditions of Cloudflare Workers.
Core Features & Use Cases
- Cloudflare Workers Testing: Provides a configuration to run
@cloudflare/vitest-pool-workers for testing Workers, including D1, KV, and other bindings.
- Runtime Constraints: Includes critical information about API limitations and required web standards for Workers testing.
- Installation and Configuration: Offers detailed instructions on how to install and configure the necessary tools and settings for testing.
- D1 and KV Bindings: Specifies how to use D1 and KV bindings with migrations and namespaces in tests.
- Test Patterns: Describes how to structure tests for different scenarios, such as unit, integration, and acceptance testing.
Quick Start
Run 'npm install -D vitest @cloudflare/vitest-pool-workers' to install dependencies, then configure your vitest.config.ts file according to the provided example.