CtrlK
BlogDocsLog inGet started
Tessl Logo

testing

Write and maintain tests with Rstest dual projects, mock utilities, and Zustand store testing patterns.

62

Quality

74%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./frontend/.claude/skills/testing/SKILL.md
SKILL.md
Quality
Evals
Security

Testing

Write reliable tests with Rstest dual projects.

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:watch        # Watch mode
bun run test:coverage     # Coverage report

Key Points

  • .test.ts = unit (Node.js), .test.tsx = integration (happy-dom)
  • 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.

Repository
redpanda-data/console
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.