Test framework
The project uses Vitest for unit and integration testing with support for coverage reports and an interactive UI.Run tests
Coverage reports
Generate code coverage reports:coverage/ directory with HTML, JSON, and lcov formats.
Test UI
Run tests with an interactive browser UI:http://localhost:51204/__vitest__/ where you can:
- View test results in real-time
- Filter tests by file, status, or text
- See code coverage highlighted in source
- Re-run individual tests
Reliability checks
The project includes a comprehensive reliability suite that verifies:- Server health endpoints
- Session lifecycle (start/end)
- Navigation and content extraction
- Multi-tab workflows
- Repeatable execution
What gets tested in CI
The GitHub Actions CI workflow (.github/workflows/ci.yml) runs:
npm ci— clean dependency installnpm run typecheck— TypeScript type checkingnpm run lint— ESLint code qualitynpm run format:check— Prettier formattingnpm test— 127 Vitest tests across 6 test files
Test files
Test files are located alongside source files with.test.ts extension:
src/session.test.ts— session management testssrc/tools/__tests__/index.test.ts— MCP tool testssrc/scripts/codingStyle.test.ts— coding style compliancesrc/scripts/format.test.ts— Prettier formatting checkssrc/scripts/lint.test.ts— ESLint linting checkssrc/scripts/typecheck.test.ts— TypeScript type safety checks
Adding tests
When adding new tools or features, include tests:Debugging tests
For debugging, use the Vitest UI or add.only to focus on a specific test: