23 lines
650 B
Markdown
23 lines
650 B
Markdown
# Testing — Q-Edit
|
|
|
|
## Stack
|
|
|
|
- **Vitest** with **jsdom** for DOM-related tests.
|
|
- Coverage via **v8** with thresholds Lines 70 / Branches 70 / Functions 50 / Statements 70.
|
|
|
|
## Conventions
|
|
|
|
- Place tests under `tests/` with suffix `.test.mjs` or `.spec.mjs`.
|
|
- Keep tests deterministic; avoid real sleeps. For pure utils, test inputs/outputs.
|
|
- For DOM tests, load `index.html` and assert on key elements (smoke tests).
|
|
|
|
## Commands
|
|
|
|
- `npm test` — run once with coverage
|
|
- `npm run test:watch` — watch mode
|
|
|
|
## Roadmap
|
|
|
|
- As we extract modules from `script.js`, add unit tests per module.
|
|
- Later: E2E with Playwright (mock network via MSW).
|