The project uses two separate test runners that must not be mixed.
Covers all files under src/ (*.test.ts and *.test.tsx).
# Run once with coverage (CI mode)
npm test
# Interactive watch mode
npm run test:watch
# Run a single file
npx vitest run src/components/__tests__/NavLink.test.tsxCoverage is written to coverage/. Open coverage/index.html for the HTML report.
Enforced thresholds: statements 50 %, branches 80 %, functions 65 %, lines 50 %.
Environment: .test.tsx files run in jsdom (DOM + RTL available). .test.ts files run in node.
Setup file: src/setupTests.ts — imports @testing-library/jest-dom so all RTL matchers (toBeInTheDocument, etc.) are available globally.
@ alias: @ resolves to src/. Use it in test imports the same way production code does:
import { foo } from '@/utils/foo';Covers files under design-system/src/.
cd design-system
# Run once
npm test
# Interactive watch mode
npm run test:watch# App
npm run lint
# Design-system
cd design-system && npm run linttype/short-slug
Examples: feat/vault-filter, test/navlink-coverage, docs/contributing-guide, fix/pagination-reset.
- PRs are expected to land within 96 hours of being opened.
- Keep the diff focused — one concern per PR.
- Every new or changed line of testable code should maintain or improve coverage above the thresholds above.