# Test

> Run tests and analyze results, fix failing tests Use when this capability is needed.

- Skill: `tomevault-io/test-42` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/test-42`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/test-42/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/test-42

---


Run tests and provide detailed analysis of results.

## Process

1. **Detect Test Framework**
   - Check `package.json` for test scripts
   - Look for vitest.config.ts, jest.config.ts, playwright.config.ts

2. **Run Tests**
   ```bash
   # Unit tests
   npm run test -- $ARGUMENTS

   # With coverage
   npm run test -- --coverage $ARGUMENTS

   # E2E tests
   npm run test:e2e -- $ARGUMENTS
   ```

3. **Analyze Results**
   - Parse test output
   - Identify failures
   - Check coverage metrics

4. **Fix Failures** (if requested)
   - Read failing test files
   - Identify the issue
   - Propose fix

## Test Commands by Framework

### Vitest
```bash
npx vitest run              # Run all tests
npx vitest run path/to/test # Run specific test
npx vitest --coverage       # With coverage
```

### Jest
```bash
npx jest                    # Run all tests
npx jest path/to/test       # Run specific test
npx jest --coverage         # With coverage
```

### Playwright
```bash
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

```markdown
## 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

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/martinacostadev) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

