Added vitest-sonar-reporter to the project

This commit is contained in:
Liviu Burcusel 2025-09-15 16:43:20 +02:00
parent d549aafafe
commit befc3caa2f
Signed by: liviu
GPG key ID: 6CDB37A4AD2C610C
4 changed files with 21 additions and 0 deletions

14
package-lock.json generated
View file

@ -30,6 +30,7 @@
"vite": "^7.0.6", "vite": "^7.0.6",
"vite-plugin-vue-devtools": "^8.0.0", "vite-plugin-vue-devtools": "^8.0.0",
"vitest": "^3.2.4", "vitest": "^3.2.4",
"vitest-sonar-reporter": "^2.0.4",
"vue-tsc": "^3.0.4" "vue-tsc": "^3.0.4"
}, },
"engines": { "engines": {
@ -5516,6 +5517,19 @@
} }
} }
}, },
"node_modules/vitest-sonar-reporter": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/vitest-sonar-reporter/-/vitest-sonar-reporter-2.0.4.tgz",
"integrity": "sha512-6mKFLXYzaHsuR+qnmuXXVhcjhostuicZ9iL3I325uf6sUKSZ2ZOpDWUBcgQwEmGs2xE05SPF6F72eoHmfOWX7A==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"peerDependencies": {
"vitest": ">=1"
}
},
"node_modules/vscode-uri": { "node_modules/vscode-uri": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz",

View file

@ -38,6 +38,7 @@
"vite": "^7.0.6", "vite": "^7.0.6",
"vite-plugin-vue-devtools": "^8.0.0", "vite-plugin-vue-devtools": "^8.0.0",
"vitest": "^3.2.4", "vitest": "^3.2.4",
"vitest-sonar-reporter": "^2.0.4",
"vue-tsc": "^3.0.4" "vue-tsc": "^3.0.4"
} }
} }

View file

@ -7,3 +7,5 @@ sonar.sourceEncoding=UTF-8
sonar.tests=tests sonar.tests=tests
sonar.exclusions=**/node_modules/**, **/coverage/**, tests/** sonar.exclusions=**/node_modules/**, **/coverage/**, tests/**
sonar.coverage.exclusions=tests/** sonar.coverage.exclusions=tests/**
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.testExecutionReportPaths=coverage/sonar-report.xml

View file

@ -9,6 +9,10 @@ export default mergeConfig(
environment: "jsdom", environment: "jsdom",
exclude: [...configDefaults.exclude, "e2e/**"], exclude: [...configDefaults.exclude, "e2e/**"],
root: fileURLToPath(new URL("./", import.meta.url)), root: fileURLToPath(new URL("./", import.meta.url)),
reporters: [
'default',
['vitest-sonar-reporter', { outputFile: 'coverage/sonar-report.xml' }],
],
coverage: { coverage: {
reporter: ["text", "lcov"], reporter: ["text", "lcov"],
}, },