AgentSkillsCN

tdd-typescript

具备 Vitest、严格的红绿重构方法、React 组件测试以及全面覆盖模式的 TypeScript/JavaScript 测试驱动开发专长。适用于采用 TDD 实现 TypeScript 功能、编写 Vitest 测试、测试 React 组件、以测试优先方式开发,或当用户提到“TypeScript TDD”、“Vitest”、“React 测试”、“JavaScript TDD”、“红绿重构”、“TypeScript 单元测试”或“测试驱动的 TypeScript”时。

SKILL.md
--- frontmatter
name: tdd-typescript
description: "TypeScript/JavaScript Test-Driven Development with Vitest, strict red-green-refactor methodology, React component testing, and comprehensive coverage patterns. Use when implementing TypeScript features with TDD, writing Vitest tests, testing React components, developing with test-first approach, or when user mentions 'TypeScript TDD', 'Vitest', 'React testing', 'JavaScript TDD', 'red-green-refactor', 'TypeScript unit tests', or 'test-driven TypeScript'."
# v2.0.43: Skills to auto-load for subagents spawned from this skill
skills:
  - code-style
  - test-generation
# v2.0.74: Restrict tools available when this skill is active
allowed-tools:
  - Read
  - Write
  - MultiEdit
  - Bash
  - Grep
  - Glob
  - TodoWrite

TDD TypeScript Skill

Expert TypeScript/JavaScript TDD implementation using strict red-green-refactor methodology with Vitest testing framework.

Description

Implement features by writing failing tests first, minimal code to pass, then refactoring. Comprehensive TypeScript/React TDD patterns.

What's Included

  • Examples: TDD cycles, React component TDD, utility function TDD
  • Reference: Red-green-refactor patterns, Vitest best practices
  • Templates: Test templates, implementation workflows

Use When

  • Implementing TypeScript features with TDD
  • React component development
  • Ensuring high test coverage

Related Agents

  • tdd-typescript-implementer

Skill Version: 1.0