vitest-sonar-reporter
Version:
SonarQube reporter for Vitest
26 lines (25 loc) • 799 B
TypeScript
import type { Reporter } from 'vitest/node';
type File = Parameters<NonNullable<Reporter['onFinished']>>[0][number];
/**
* Generate XML. Reference:
*
* ```xml
*
* <testExecutions version="1">
* <file path="testx/ClassOneTest.xoo">
* <testCase name="test1" duration="5"/>
* <testCase name="test2" duration="500">
* <skipped message="short message">other</skipped>
* </testCase>
* <testCase name="test3" duration="100">
* <failure message="short">stacktrace</failure>
* </testCase>
* <testCase name="test4" duration="500">
* <error message="short">stacktrace</error>
* </testCase>
* </file>
* </testExecutions>
* ```
*/
export declare function generateXml(files?: File[]): string;
export {};