test
Installation
SKILL.md
Run tests and provide detailed analysis of results.
Process
-
Detect Test Framework
- Check
package.jsonfor test scripts - Look for vitest.config.ts, jest.config.ts, playwright.config.ts
- Check
-
Run Tests
# Unit tests npm run test -- $ARGUMENTS # With coverage npm run test -- --coverage $ARGUMENTS # E2E tests npm run test:e2e -- $ARGUMENTS -
Analyze Results
- Parse test output
- Identify failures
- Check coverage metrics
-
Fix Failures (if requested)
- Read failing test files
- Identify the issue
- Propose fix
Test Commands by Framework
Vitest
npx vitest run # Run all tests
npx vitest run path/to/test # Run specific test
npx vitest --coverage # With coverage
Jest
npx jest # Run all tests
npx jest path/to/test # Run specific test
npx jest --coverage # With coverage
Playwright
npx playwright test # Run all tests
npx playwright test file # Run specific test
npx playwright test --ui # Interactive mode
Coverage Requirements
- Domain layer: 100%
- Application layer: 90%
- Components: 80%
Output Format
## Test Results
### Summary
- Total: X tests
- Passed: X
- Failed: X
- Coverage: X%
### Failures
[Details of any failing tests]
### Coverage Gaps
[Files below threshold]
### Recommendations
[Suggestions for improving test coverage]
Target: $ARGUMENTS
Related skills
More from martinacostadev/claude-react-agents
new-component
Create a new React component with TypeScript and tests
4new-page
Create a new Next.js App Router page with proper structure
3commit
Create a well-formatted conventional commit with proper message
3review
Review code changes for quality, security, and best practices
3new-feature
Create a complete feature module for Expo with screen, components, hooks, and services
3