mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-29 16:10:07 +00:00
7e9ab58a16
Vitest 5 resolves only with coverage-v8 and coverage-istanbul of the same version, and jest-dom 8 is the first release whose matcher types merge with its Assertion. The sharded CI jobs read and write the blob reports under .vitest/blob, where 5 puts them, and clearMocks stays off as in 4.
25 lines
859 B
TypeScript
25 lines
859 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
// Vitest 5 clears every mock's call history before each test; keep 4's behaviour.
|
|
clearMocks: false,
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['lcov', 'text'],
|
|
reportsDirectory: './coverage',
|
|
include: ['src/**/*.ts'],
|
|
// Mirrored in sonar.coverage.exclusions — a file skipped here emits no
|
|
// lcov entry, so Sonar must not count it as uncovered either.
|
|
exclude: [
|
|
// Machine-generated by server/scripts/gen-plugin-facts.ts.
|
|
'src/plugin-permissions.ts',
|
|
// Per-locale string tables are data, not executable code; the parity
|
|
// specs import every locale, which would report them as 100% covered
|
|
// and inflate the package number.
|
|
'src/i18n/*/**',
|
|
],
|
|
},
|
|
},
|
|
});
|