PMDevSolutions/Aurelius / .claude/skills/test
test
VerifiedTest Runner
Run Vitest tests with coverage reporting.
Purpose
This command runs the project's test suite using Vitest and React Testing Library.
Usage
/test # whole suite
/test src/components/Button.test.tsx # one file
/test -t "should render" --coverage # by name, with coverage
With arguments, run pnpm vitest run $ARGUMENTS; without, run the whole suite.
What this command does
- Detects test configuration (vitest.config.ts or vite.config.ts)
- Runs all tests with proper configuration
- Shows coverage report if configured
- Reports failures with clear error details
Steps
1. Run all tests
pnpm vitest run
2. Run with coverage
pnpm vitest run --coverage
3. Run specific test file
pnpm vitest run src/components/Button.test.tsx
4. Run in watch mode (interactive development)
pnpm vitest
5. Run tests matching a pattern
pnpm vitest run -t "should render"
Or use the project script
./scripts/run-tests.sh
Test Types
| Type | Tool | Pattern | Purpose |
|---|---|---|---|
| Unit | Vitest | *.test.ts | Pure functions, utilities |
| Component | Vitest + RTL | *.test.tsx | React component behavior |
| Hook | Vitest + RTL | *.test.ts | Custom hook logic |
| E2E | Playwright | *.spec.ts | Full user flows |
| Visual | Storybook | *.stories.tsx | Component states |
Common Issues
- Missing setup file: Create
src/test/setup.tswithimport '@testing-library/jest-dom' - JSX not recognized: Ensure
environment: 'jsdom'in vitest config - Module resolution: Check
resolve.aliasmatches tsconfig paths
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |