SonarQube reporter for Vitest
MIT License
The old sonarReporterOptions.silent
is no longer supported. Use custom reporter options instead:
export default defineConfig({
test: {
- reporters: 'vitest-sonar-reporter',
- sonarReporterOptions: { silent: true }
+ reporters: ['vitest-sonar-reporter', { silent: true }],
},
});
sonarReporterOptions.silent
option by @AriPerkkio in https://github.com/AriPerkkio/vitest-sonar-reporter/pull/165
Full Changelog: https://github.com/AriPerkkio/vitest-sonar-reporter/compare/v1.1.0...v2.0.0
Published by AriPerkkio 8 months ago
This release adds support for passing custom reporter options. See https://github.com/vitest-dev/vitest/pull/5111 for more information about Vitest's new reporter API. There's also new onWritePath
option that can be used to rewrite <file>
element's path
attributes.
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
reporters: [
"default",
["vitest-sonar-reporter", { outputFile: "sonar-report.xml", silent: true }],
"junit",
],
},
});
onWritePath
optionimport { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
reporters: [
['vitest-sonar-reporter', {
onWritePath(path: string) {
console.log(path);
// ^^^^ "test/fixtures/animals.test.ts"
return `custom-prefix/${path}`;
}
}],
],
},
});
<testExecutions version="1">
- <file path="test/fixtures/animals.test.ts">
+ <file path="custom-prefix/test/fixtures/animals.test.ts">
<testCase name="animals - dogs say woof" duration="123" />
</file>
</testExecutions>
<file path="...">
attributes by @AriPerkkio in https://github.com/AriPerkkio/vitest-sonar-reporter/pull/154
Full Changelog: https://github.com/AriPerkkio/vitest-sonar-reporter/compare/v1.0.0...v1.1.0
Published by AriPerkkio 11 months ago
Adds support for [email protected]
🎉
Full Changelog: https://github.com/AriPerkkio/vitest-sonar-reporter/compare/v0.5.0...v1.0.0
Published by AriPerkkio about 1 year ago
Full Changelog: https://github.com/AriPerkkio/vitest-sonar-reporter/compare/v0.4.1...v0.5.0
Published by AriPerkkio over 1 year ago
Example of Vitest Workspace usage
Full Changelog: https://github.com/AriPerkkio/vitest-sonar-reporter/compare/v0.4.0...v0.4.1
Published by AriPerkkio over 1 year ago
Full Changelog: https://github.com/AriPerkkio/vitest-sonar-reporter/compare/v0.3.5...v0.4.0