backend-test
生成后端测试(单元测试、集成测试、模拟测试)。当用户说"write test for"、"add test"、"test this"或"create test"时自动调用。
📖 中文导读:生成后端测试(单元测试、集成测试、模拟测试)。当用户说"write test for"、"add test"、"test this"或"create test"时自动调用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: backend-test description: Generate backend tests (unit, integration, mocks). Auto-invoke when user says "write test for", "add test", "test this", or "create test". allowed-tools: Read, Write, Edit, Grep, Glob, Bash version: 1.0.0
Backend Test Generator
Generate comprehensive backend tests with Jest/Vitest including fixtures and mocks.
When to Invoke
Auto-invoke when user mentions:
- "Write test for"
- "Add test"
- "Test this"
- "Create test"
- "Test [component/function]"
What This Does
- Generates test file with describe/it blocks
- Creates test fixtures
- Generates mocks for dependencies
- Includes edge cases
- Follows testing best practices
Success Criteria
- Test file generated with proper structure
- Tests cover happy path and error cases
- Mocks isolate unit under test
- Fixtures provide test data
- Tests are runnable and pass
Auto-invoke when writing backend tests 🧪