test

sanity-labs's avatarfrom sanity-labs

Run tests and report results. Use when you need to verify code changes work correctly.

0stars🔀0forks📁View on GitHub🕐Updated Jan 8, 2026

When & Why to Use This Skill

This Claude skill streamlines the software development lifecycle by automating test execution and result interpretation. It enables developers to verify code changes instantly, identify regression errors, and receive intelligent suggestions for fixing failed assertions, ultimately improving code reliability and accelerating the debugging process.

Use Cases

  • Regression Testing: Automatically run the full test suite after code changes or refactoring to ensure existing functionality remains intact.
  • Continuous Development Feedback: Use watch mode during active coding sessions to receive immediate alerts when a change breaks a test.
  • Code Coverage Optimization: Execute coverage reports to identify untested code paths and ensure high-quality software standards.
  • Targeted Debugging: Isolate specific failing components by running tests that match a particular name or pattern, reducing noise from unrelated tests.
nametest
descriptionRun tests and report results. Use when you need to verify code changes work correctly.

Test Runner

Run the test suite and interpret results.

Usage

Just say /test to run all tests, or specify options:

  • /test - Run all tests once
  • /test watch - Run tests in watch mode
  • /test coverage - Run with coverage report
  • /test <pattern> - Run tests matching pattern

Instructions

  1. Run the appropriate test command based on user request:

    • Default: pnpm test
    • Watch mode: pnpm test:watch
    • Coverage: pnpm test:coverage
    • Pattern: pnpm test -- --testNamePattern="<pattern>"
  2. Parse the output and report:

    • Number of tests passed/failed
    • Which specific tests failed
    • Error messages and stack traces for failures
  3. If tests fail:

    • Identify the failing test file and test name
    • Show the relevant assertion error
    • Suggest what might need to be fixed
  4. If tests pass:

    • Confirm success briefly
    • Show coverage summary if requested

Example Output

✓ 12 tests passed
✗ 1 test failed

FAILED: packages/groq-lint/src/rules/__tests__/join-in-filter.test.ts
  × join-in-filter > invalid > nested join in filter
    Expected 2 errors but got 1

Suggestion: The nested dereference case may need adjustment in the walker.