typescript-testing

Enforce Vitest rules and 70% coverage across TypeScript tests.

225|24|Updated Jul 27, 2025
One-click install
npx skills add https://github.com/shinpr/ai-coding-project-boilerplate --skill typescript-testing-shinpr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-testing
Source: https://github.com/shinpr/ai-coding-project-boilerplate/tree/main/.claude/skills-ja/typescript-testing
Command: npx skills add https://github.com/shinpr/ai-coding-project-boilerplate --skill typescript-testing-shinpr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the testing process by enforcing coverage requirements, test design principles, and quality standards.

Core Features & Use Cases

  • Vitest Framework: Execute unit and integration tests with type-safe mocks.

Quick Start

Test the calculateTotal function with 70% coverage requirement.

Core Features & Use Cases

  • Test Quality Assurance: Ensure all tests meet strict quality criteria including boundary coverage and result-based verification.

Quick Start

Write tests for the calculateTotal function to ensure it returns correct values for various input arrays.

Frequently Asked Questions about typescript-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up TypeScript testing with Vitest to meet coverage requirements?

TypeScript testing with Vitest enforces a standardized workflow that requires 70%+ code coverage, proper mock scoping, and adherence to naming conventions. Start by configuring Vitest in your TypeScript project, then structure unit and integration tests to follow directory standards and include boundary cases and literal assertions for each function.

What coverage level should my TypeScript tests achieve?

TypeScript tests should maintain a minimum of 70% code coverage to satisfy quality standards. This metric is automatically enforced alongside test design principles including independence, reproducibility, and proper mocking to ensure your unit, integration, and E2E tests verify all critical paths and edge cases.

How do I write quality TypeScript tests that verify correct behavior?

Write TypeScript tests using Vitest with result-based verification—tests should confirm exact return values across various inputs, include boundary cases, use literal assertions, and employ property-based testing where applicable. Follow naming conventions and mock scoping rules to ensure tests remain independent and reproducible across your project.

Can I run unit, integration, and end-to-end tests together in TypeScript?

Yes. Vitest supports unit tests, integration tests, and cross-functional E2E verifications all within a single TypeScript testing workflow. The standardized approach enforces consistent test types, scopes, and quality criteria across all verification levels to ensure reproducibility and proper mock isolation.

What makes TypeScript tests independent and reproducible?

TypeScript tests achieve independence and reproducibility through proper mock scoping rules, naming conventions, and directory structure standards. Vitest enforces these patterns to ensure each test runs in isolation without side effects, produces consistent results, and remains readable—critical for reliable unit, integration, and E2E verification.