feat: Publish test coverage summaries to PRs (#513)

This commit is contained in:
Allen Hutchison
2025-05-27 12:45:28 -07:00
committed by GitHub
parent 9595e98db8
commit 4e3c539f5e
7 changed files with 184 additions and 11 deletions

View File

@@ -10,6 +10,22 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'jsdom',
globals: true, // Optional: enables global APIs like describe, it, expect
globals: true,
reporters: ['default', 'junit'],
outputFile: {
junit: 'junit.xml',
},
coverage: {
provider: 'v8',
reportsDirectory: './coverage',
reporter: [
['text', { file: 'full-text-summary.txt' }],
'html',
'json',
'lcov',
'cobertura',
['json-summary', { outputFile: 'coverage-summary.json' }],
],
},
},
});