testing

Standardize unit and E2E testing conventions for Sandbox SDK projects.

1.1k|107|Updated Jun 22, 2025
One-click install
npx skills add https://github.com/cloudflare/sandbox-sdk --skill testing-cloudflare
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/cloudflare/sandbox-sdk/tree/main/.opencode/skill/testing
Command: npx skills add https://github.com/cloudflare/sandbox-sdk --skill testing-cloudflare

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes testing conventions for Sandbox SDK projects, reducing ambiguity in how tests are written and organized.

Core Features & Use Cases

  • Defines unit test strategies, E2E test coverage, and mock patterns.
  • Specifies test file locations for both SDK and container components.
  • Guides runtime environments (Workers vs Bun) and common test commands, enabling consistent CI and local validation.

Quick Start

Review this skill's conventions to align your changes. Then run the standard tests:

  • npm test for unit tests
  • npm run test:e2e for end-to-end tests Make sure to adapt commands to your workspace.

Frequently Asked Questions about testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize unit and e2e test conventions for Sandbox SDK projects?

Standardize testing conventions by defining unit and E2E test strategies, mock patterns, and file locations for SDK and container components to reduce ambiguity. This skill enforces clear tooling and runtimes so tests are written and organized consistently.

What's the best way to run unit and e2e tests in a Sandbox SDK environment?

Run unit tests and e2e tests using standard command patterns like npm test and npm run test:e2e. Adapting these commands to your workspace ensures consistent local validation and CI integration across your project.

Does the testing skill support both Workers and Bun runtimes for vitest?

Yes, the testing skill guides runtime environments for both Workers and Bun. It specifies the appropriate runtimes for your test execution, ensuring consistent behavior across SDK and container components.

Where should test files be located for SDK and container components?

Test files should be placed in specific locations defined for both SDK and container components. Enforcing clear file locations keeps your testing conventions organized and reduces ambiguity across the project.

How do mock patterns work for Sandbox SDK testing conventions?

Mock patterns define how dependencies are simulated during unit and E2E testing. Establishing consistent mock patterns ensures reliable test execution and clear validation across different SDK and container components.