vitest-cloudflare-config

Community

Configure Vitest for Cloudflare Workers testing

Authoreykd
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

vitest@cloudflare/vitest-pool-workers

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: vitest-cloudflare-config
Download link: https://github.com/eykd/vance-ts/archive/main.zip#vitest-cloudflare-config

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.