vitest-testing
БесплатноЗапускает вложенные скриптыНе проверен**AI-friendly comprehensive testing guidance for Vitest with practical patterns and behavior-driven development.**
от aiskillstore★ 509 звёзд на GitHubОб этом скилле
Vitest Testing Skill - Master Reference
AI-friendly comprehensive testing guidance for Vitest with practical patterns and behavior-driven development.
For humans: Start with README.md for full navigation For AI agents: This file provides quick access to all skill resources
🎯 Quick Access for Agents
Decision Support
- What type of test should I write? → index.md
- How do I structure this test? → principles/aaa-pattern.md
- Is this code testable? → refactoring/testability-patterns.md
Most Referenced Patterns
- F.I.R.S.T Principles - Fast, Isolated, Repeatable, Self-Checking, Timely
- AAA Pattern - Arrange-Act-Assert structure
- Black Box Testing - Test behavior through public APIs
- Test Doubles - Mocks, stubs, spies, fakes
📚 Skill Organization
Core Principles /principles/
Foundation concepts that guide all testing decisions:
| File | Purpose | When to Use |
|---|---|---|
| first-principles.md | F.I.R.S.T quality attributes | Every test |
| aaa-pattern.md | Arrange-Act-Assert structure | Structuring tests |
| bdd-integration.md | Given/When/Then with AAA | Business-focused tests |
Testing Strategies /strategies/
Approaches for different testing scenarios:
| File | Purpose | When to Use |
|---|---|---|
| black-box-testing.md | Testing via public APIs | Default approach (99% of tests) |
| implementation-details.md | When to test internals | Rare exceptions only |
Practical Patterns /patterns/
Ready-to-use patterns for common scenarios:
| File | Purpose | When to Use |
|---|---|---|
| test-doubles.md | Mocks, stubs, spies, fakes | Isolating dependencies |
| async-testing.md | Testing promises, async/await | Async operations |
| error-testing.md | Testing exceptions, edge cases | Error scenarios |
| component-testing.md | React/Vue component patterns | UI components |
| api-testing.md | HTTP clients, REST APIs | API integration |
| performance-testing.md | Benchmarks, load testing | Performance-critical code |
| test-data.md | Factories, builders, fixtures | Test data management |
Refactoring for Testability /refactoring/
Transform untestable code into testable code:
| File | Purpose | When to Use |
|---|---|---|
| testability-patterns.md | Extract pure functions, DI, etc. | Code hard to test |
Quick Reference /quick-reference/
Fast lookups and decision aids:
| File | Purpose | When to Use |
|---|---|---|
| cheatsheet.md | Syntax, matchers, mocking | Quick syntax lookup |
| jest-to-vitest.md | Migration from Jest | Migrating projects |
🤖 Agent Integration Points
For typescript-coder Agent
When writing tests:
// 1. Check decision tree
const testType = checkDecisionTree(codeType)
// Reference: /skills/vitest-testing/index.md
// 2. Apply F.I.R.S.T principles
ensureTestsAreFast() // < 100ms
ensureTestsAreIsolated() // No shared state
// Reference: /skills/vitest-testing/principles/first-principles.md
// 3. Use AAA structure
// Arrange → Act → Assert
// Reference: /skills/vitest-testing/principles/aaa-pattern.md
// 4. Follow black box strategy
testThroughPublicAPI() // Not private methods
// Reference: /skills/vitest-testing/strategies/black-box-testing.md
When refactoring:
// Check if code is testable
if (isHardToTest(code)) {
// Apply testability patterns
applyPattern(testabilityPatterns)
// Reference: /skills/vitest-testing/refactoring/testability-patterns.md
}
For Code Review Agents
Check these aspects:
- Tests follow F.I.R.S.T principles
- Tests use AAA structure
- Tests use black box approach (public APIs only)
- Proper mocking of external dependencies
- Error scenarios covered
- Async operations handled correctly
🎯 Common Workflows
Workflow 1: Writing Tests for New Feature
1. Consult decision tree → /skills/vitest-testing/index.md
2. Determine test type → Unit/Integration/Component
3. Apply F.I.R.S.T principles → /skills/vitest-testing/principles/first-principles.md
4. Structure with AAA → /skills/vitest-testing/principles/aaa-pattern.md
5. Use relevant pattern → /skills/vit
Установить vitest-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл vitest-testing?
**AI-friendly comprehensive testing guidance for Vitest with practical patterns and behavior-driven development.**
Как установить скилл vitest-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vitest-testing запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic