What problem does it solve?
This Skill provides expert guidance on writing effective and comprehensive tests in TypeScript, addressing the nuances of both runtime behavior and type correctness. It helps developers integrate robust testing practices, avoid common mistakes, and ensure high code quality through a structured Test-Driven Development (TDD) workflow.
Core Features & Use Cases
- Dual Testing Expertise: Offers clear instructions on when and how to apply both runtime (e.g., Vitest) and type (e.g., inferred-types) tests, crucial for modern TypeScript projects.
- TDD Workflow Integration: Details a structured 5-step TDD process (Snapshot, Log, Write Tests, Implement, Close Out) to systematically build and verify features.
- Common Mistakes & Best Practices: Highlights frequent errors in type testing and provides general testing principles for creating maintainable, high-quality, and deterministic tests.
- Use Case: When developing a new TypeScript function or component, activate this Skill to get immediate, context-aware advice on structuring your tests, choosing the appropriate testing approach (runtime vs. type), and following a TDD cycle to build reliable and type-safe code.
Quick Start
To capture the initial state for a new testing phase (e.g., "my-feature-test", phase 1):
bun run .claude/skills/testing/scripts/start-position.ts my-feature-test 1