Testing Overview
PIP AI uses Vitest as the test framework with happy-dom for DOM simulation.
Test Stack
| Tool | Purpose |
|---|---|
| Vitest | Test runner and assertion library |
| happy-dom | DOM environment for component tests |
| @vue/test-utils | Vue component testing utilities |
| @nuxt/test-utils | Nuxt-specific testing helpers |
Test Structure
tests/
├── setup.ts # Global test setup and mocks
├── composables/ # Composable unit tests
└── ...Quick Start
bash
# Run tests in watch mode
npm test
# Single test run
npm run test:run
# With coverage report
npm run test:coverage
# Interactive UI
npm run test:ui