Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Recipes and examples

A collection of implementation patterns and code examples for writing unit and integration tests for Cloudflare Workers using the Vitest pool, covering specific bindings like KV, R2, D1, Durable Objects, and Workflows.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Recipes and examples

A collection of implementation patterns and code examples for writing unit and integration tests for Cloudflare Workers using the Vitest pool, covering specific bindings like KV, R2, D1, Durable Objects, and Workflows.

When To Use

Use when you need to implement specific testing strategies for Cloudflare Workers bindings such as D1 migrations, Durable Objects, or outbound request mocking using Vitest.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-testing-vitest-integration-recipes-and-examples-workflow-guide.mdA collection of markdown recipes demonstrating unit and integration testing patterns for Cloudflare Workers using the @cloudflare/vitest-pool-workers package.Questions about a collection of markdown recipes demonstrating unit and integration testing patterns for Cloudflare Workers using the...

What This Skill Covers

  • Recipes are examples that help demonstrate how to write unit tests and integration tests for Workers projects using the @cloudflare/vitest-pool-workers ↗ pac...

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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/recipes