Skip to content

Releases: AriPerkkio/vitest-sonar-reporter

v2.0.0

25 Feb 08:35
Compare
Choose a tag to compare

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 }],
  },
});

What's Changed

Full Changelog: v1.1.0...v2.0.0

v1.1.0 - custom options support

17 Feb 08:57
Compare
Choose a tag to compare

This release adds support for passing custom reporter options. See vitest-dev/vitest#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.

Custom options

import { defineConfig } from "vitest/config";

export default defineConfig({
  test: {
    reporters: [
      "default",
      ["vitest-sonar-reporter", { outputFile: "sonar-report.xml", silent: true }],
      "junit",
    ],
  },
});

onWritePath option

import { 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>

What's Changed

Full Changelog: v1.0.0...v1.1.0

v1.0.0 - Support Vitest 1.0

04 Dec 16:40
Compare
Choose a tag to compare

Adds support for [email protected] πŸŽ‰

What's Changed

Full Changelog: v0.5.0...v1.0.0

v0.5.0 - Support [email protected]

27 Oct 15:45
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.4.1...v0.5.0

v0.4.1 - Workspace support fixed

18 May 17:58
Compare
Choose a tag to compare

What's Changed

Example of Vitest Workspace usage

Full Changelog: v0.4.0...v0.4.1

v0.4.0

22 Mar 09:21
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.5...v0.4.0