mcpField
T
testing

testing

github.com/redpanda-dataTesting & quality4.3k45 installsUpdated today
Repository

About testing

A testing skill for projects using Vitest v4 dual configuration. It helps developers write and debug tests, set up mocks, choose test types, and verify that interactive features are wired to their behavior.

Key features

  1. 01Distinguish unit and integration tests
  2. 02Provide module mocking patterns
  3. 03Test Zustand stores
  4. 04Verify interactive feature wiring
  5. 05Run coverage and interactive tests

Use cases

  1. 01Write or modify tests
  2. 02Investigate test failures
  3. 03Mock modules, stores, or transports

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/redpanda-data/console --skill testing

After installing, type/testingin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

rules/
mock-transport.md
no-ui-rendering-tests.md
test-mock-patterns.md
test-unit-vs-integration.md
test-zustand-stores.md

Details

From the project README

Testing

Write reliable tests with Vitest v4 dual configuration.

Activation Conditions

  • Writing or modifying tests
  • Debugging test failures
  • Setting up mocks
  • Questions about test configuration

Quick Reference

ActionRule
Choose test typetest-unit-vs-integration.md
Mock modulestest-mock-patterns.md
Test storestest-zustand-stores.md
Mock Connect APIsmock-transport.md
Skip UI rendering testsno-ui-rendering-tests.md

Commands

bun run test              # All tests (CI default)
bun run test:ci           # Sequential for CI
bun run test:unit         # Unit tests only
bun run test:integration  # Integration tests only
bun run test:ui           # Interactive UI
bun run test:watch        # Watch mode
bun run test:coverage     # Coverage report

Key Points

  • .test.ts = unit (Node.js), .test.tsx = integration (JSDOM)
  • Always use test-utils/test-utils.tsx for React component tests
  • Test that features are fully wired: UI elements must connect to actual functionality
Feature Completeness Testing

When implementing interactive features (buttons, forms, etc.):

  • Verify event handlers call the correct functions with proper parameters
  • Test that AbortSignals, callbacks, and other "plumbing" are passed through
  • Don't assume UI presence means functionality works - test the connection

When to Use This Skill

  • Writing .test.ts or .test.tsx files
  • Mocking modules, stores, or transports
  • Component behavior tests

NOT for: Multi-page user workflows → use e2e-tester

Rules

See rules/ directory for detailed guidance.

Comments

Markdown supported