diff --git a/vitest.config.mts b/vitest.config.mts index 618cd5f..b32975d 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -5,6 +5,9 @@ import { configDefaults } from 'vitest/dist/config' export default defineVitestConfig({ test: { coverage: { + provider: 'v8', + reportsDirectory: 'coverage', + reporter: ['text', 'html', 'lcov', 'json'], exclude: [ ...(configDefaults.coverage.exclude ?? []), 'layouts/**', @@ -13,6 +16,12 @@ export default defineVitestConfig({ '**/*.config.{js,ts,mts,mjs}', ], }, + globals: true, + reporters: ['verbose', 'json', 'vitest-sonar-reporter'], + outputFile: { + 'json': 'coverage/test-report.json', + 'vitest-sonar-reporter': 'coverage/test-report.xml', + }, }, // test: { // dir: 'tests',