test-unit
Test individual functions and methods in isolation. Test happy path, edge cases, and error handling. Use when adding new functions, after bug fixes, or before…
от dhaupin★ 16 звёзд на GitHub
Установить test-unit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Unit Test
Test individual functions.
When To Use
- New function
- After bug fix
- Before commit
What To Test
1. Happy Path
test('add works', () => {
expect(add(1, 2)).toBe(3)
})
2. Edge Cases
test('add handles null', () => {
expect(add(null, 2)).toBe(2)
})
test('add handles string', () => {
expect(add('1', 2)).toBe(3)
})
3. Errors
test('add throws on invalid', () => {
expect(() => add()).toThrow()
})
Patterns
| Test | For |
|---|---|
| toBe | Exact value |
| toEqual | Structure |
| toThrow | Errors |
| toHaveBeenCalled | Functions |
Output
## Unit Tests
### Passed
- [n] tests
### Failed
- [n] tests
### Coverage
- [n]%
Role: Unit Tester Input: Test file Output: Test results
Test the smallest pieces.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл test-unit?
Test individual functions and methods in isolation. Test happy path, edge cases, and error handling. Use when adding new functions, after bug fixes, or before commits.
Как установить скилл test-unit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл test-unit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…