typescript-testing
TypeScript Testing Rules
Test Framework
- Vitest: This project uses Vitest
- Test imports:
import { describe, it, expect, beforeEach, vi } from 'vitest' - Mock creation: Use
vi.mock()
Basic Testing Policy
Quality Requirements
- Coverage: Unit test coverage must be 70% or higher
- Independence: Each test can run independently without depending on other tests
- Reproducibility: Tests are environment-independent and always return the same results
- Readability: Test code maintains the same quality as production code
Coverage Requirements
Mandatory: Unit test coverage must be 70% or higher Metrics: Statements, Branches, Functions, Lines
More from shinpr/ai-coding-project-boilerplate
documentation-criteria
Guides PRD, ADR, Design Doc, UI Spec, and Work Plan creation. Use when creating or reviewing technical documents, or when "UI spec/screen design/component decomposition" is mentioned.
12project-context
Provides project-specific prerequisites for AI execution accuracy. Use when checking project structure.
10coding-standards
Detects code smells, anti-patterns, and readability issues. Use when implementing features, reviewing code, or refactoring.
9technical-spec
Defines environment variables, architecture design, and build/test commands. Use when configuring environment or designing architecture.
9task-analyzer
Analyzes task essence and selects appropriate skills. Returns scale estimates and metadata. Use when starting tasks or selecting skills.
9typescript-rules
Applies type safety and error handling rules. Enforces no-any policy and type guards. Use when implementing TypeScript or reviewing types.
9