typescript-testing

Installation
SKILL.md

TypeScript Testing

Guidance for writing effective tests in TypeScript projects using Vitest or Jest.

Rules

  • Arrange-Act-Assert: Structure tests with clear setup, execution, and verification phases
  • Single Assertion Focus: Each test should verify one specific behavior
  • Descriptive Names: Use describe blocks for grouping and it/test with clear descriptions
  • Test Isolation: Tests must not depend on execution order or shared mutable state
  • Mock External Dependencies: Always mock I/O, network calls, and system interactions
  • Coverage Targets: Aim for 80%+ line coverage, 70%+ branch coverage
  • No Logic in Tests: Avoid conditionals and loops in test code
  • Clean Up: Use beforeEach/afterEach for setup/teardown, never leave test artifacts

Patterns

Test Structure

Installs
Repository
smithery/ai
First Seen
typescript-testing — smithery/ai