ci: add test coverage reporting with v8 provider

- Add vitest.config.ts with v8 coverage provider
- Add npm run test:coverage script
- Add coverage step to CI (Node 22, reports in job summary)
- Coverage tracks src/lib/ utilities (currently ~21% lines)
- Install @vitest/coverage-v8 dev dependency
This commit is contained in:
Nicolas Varrot
2026-02-13 07:27:02 +00:00
parent 41f3952548
commit 0e4ae0ed7f
4 changed files with 175 additions and 0 deletions

View File

@@ -32,6 +32,7 @@
"lint": "eslint .",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"preview": "vite preview",
"lint:fix": "eslint . --fix"
},
@@ -59,6 +60,7 @@
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.1",
"@vitest/coverage-v8": "^4.0.18",
"eslint": "^9.39.1",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.24",