- Install @vitest/coverage-v8 as devDependency (13 packages) - Add coverage block to vite.config.ts test config: - provider: 'v8' (Node.js native coverage, faster than istanbul) - reporters: text, html, lcov, json - thresholds: 70% lines, 60% branches, 70% functions, 70% statements - exclude: test files and e2e directory - Add "test:coverage": "vitest run --coverage" script to package.json - Coverage report output: frontend/coverage/index.html JSON output: frontend/coverage/coverage-final.json - Thresholds are enforced by vitest itself — build exits non-zero if any threshold is not met |
||
|---|---|---|
| .. | ||
| e2e | ||
| public | ||
| src | ||
| .gitignore | ||
| .prettierrc | ||
| eslint.config.ts | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about the recommended Project Setup and IDE Support in the Vue Docs TypeScript Guide.