cloudflare · Cloudflare Workers Docs
Workers Configuration
Configures the Vitest environment for Cloudflare Workers using the cloudflareTest Vite plugin and specialized helper functions for assets and D1 migrations.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Configuration
Configures the Vitest environment for Cloudflare Workers using the cloudflareTest Vite plugin and specialized helper functions for assets and D1 migrations.
When To Use
Use when setting up or customizing a Vitest testing suite to run against Cloudflare Workers, D1 databases, or Pages assets.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-testing-vitest-integration-configuration-workflow-guide.md | Documentation detailing the cloudflareTest Vite plugin options for configuring Workers Vitest integration, including APIs for assets, D1 migrations, and testing environments. | Questions about documentation detailing the cloudflareTest Vite plugin options for configuring Workers Vitest integration, including... |
examples/workers-testing-vitest-integration-configuration-cloudflare-workers-vite.text | A vitest configuration file demonstrating how to integrate the cloudflare-vitest-pool-workers plugin with a wrangler configuration path. | Exact payloads, commands, or snippets shown in A vitest configuration file demonstrating how to integrate the cloudflare-vitest-pool-workers plugin with a wrangler... |
examples/workers-testing-vitest-integration-configuration-cloudflare-workers-vite-2.text | A configuration file demonstrating how to integrate the Cloudflare Vitest pool with the defineConfig function. | Exact payloads, commands, or snippets shown in A configuration file demonstrating how to integrate the Cloudflare Vitest pool with the defineConfig function. |
examples/workers-testing-vitest-integration-configuration-cloudflare-workers-vite-3.text | A Vitest configuration file using the cloudflareTest plugin to define Miniflare service bindings and assets path. | Exact payloads, commands, or snippets shown in A Vitest configuration file using the cloudflareTest plugin to define Miniflare service bindings and assets path. |
examples/workers-testing-vitest-integration-configuration-cloudflare-workers-vite-4.text | A Vitest configuration file demonstrating how to integrate Cloudflare Workers testing with Miniflare and D1 migration bindings. | Exact payloads, commands, or snippets shown in A Vitest configuration file demonstrating how to integrate Cloudflare Workers testing with Miniflare and D1 migration... |
examples/workers-testing-vitest-integration-configuration-cloudflare-workers-vite-5.text | A collection of configuration files including env.d.ts, global-setup.ts, and vitest.config.ts for integrating Vitest with Cloudflare Workers. | Exact payloads, commands, or snippets shown in A collection of configuration files including env.d.ts, global-setup.ts, and vitest.config.ts for integrating Vitest... |
examples/workers-testing-vitest-integration-configuration-cloudflare-workers-vite-6.text | A TypeScript type definition for SourcelessWorkerOptions that omits script and module properties for Vitest integration. | Exact payloads, commands, or snippets shown in A TypeScript type definition for SourcelessWorkerOptions that omits script and module properties for Vitest integration. |
What This Skill Covers
- The Workers Vitest integration provides additional configuration on top of Vitest's usual options using the cloudflareTest() Vite plugin.
- Main sections:
APIs,cloudflareTest(options),buildPagesASSETSBinding(assetsPath),readD1Migrations(migrationsPath),CloudflareTestOptions.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/testing/vitest-integration/configuration
