writing-dev-server-tests

Create hot-reloading dev-server and bundling tests with bake-harness utilities and devTest functions.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/zhcndoc/bun --skill writing-dev-server-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-dev-server-tests
Source: https://github.com/zhcndoc/bun/tree/main/.claude/skills/writing-dev-server-tests
Command: npx skills add https://github.com/zhcndoc/bun --skill writing-dev-server-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers in writing tests for hot-reloading (HMR) and dev-server behavior, ensuring reliability in development workflows.

Core Features & Use Cases

  • Test harness utilities: Provides patterns and utilities (devTest, bake harness, Client) used to drive end-to-end dev-server tests.
  • Coverage of dev-server aspects: Includes tests for bundling, CSS handling, plugins, React refresh, server components, and source maps.
  • Use Case: When creating or modifying a dev server or its hot reload logic, use these tests to validate behavior before release.

Quick Start

Use the dev-server test harness to create a new test under test/bake and run it with your standard test runner to verify hot reload and bundling behaviors.

Frequently Asked Questions about writing-dev-server-tests

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

FAQPage Schema
How do I write tests for dev-server hot-reloading behavior?

To write dev-server hot-reloading tests, use a structured test harness with bake-harness utilities and devTest functions to validate HMR behavior under test/bake directories before release.

What dev-server aspects should I validate during hot reload testing?

Hot reload testing should validate bundling, CSS handling, plugins, React refresh, server components, and source maps to ensure reliable development workflows across environments.

How does the bake-harness test harness structure HMR dev-server tests?

The bake-harness provides categorized test types and an executable pattern using devTest functions and Client utilities to drive end-to-end dev-server tests within test/bake directories.

Can I use this dev-server testing approach for both JavaScript and TypeScript environments?

Yes, the dev-server test harness applies across environments for both JavaScript and TypeScript, validating hot reload and bundling behaviors using standard test runners.

When do I need to write tests for dev-server hot reload logic?

You need dev-server hot reload tests when creating or modifying a dev server or its HMR logic, ensuring behavior reliability before shipping changes to development workflows.

What's the best way to validate React refresh and source maps in a dev server?

The best way to validate React refresh and source maps is using the dev-server test harness to create categorized tests under test/bake and run them with your standard test runner.