Update the jest option for the sonar reporter (#32666)
* Update the jest option for the sonar reporter 'testResultsProcessor' is deprecated: jest-sonar-reporter supports being a regular 'reporter'. * Just add sonar reporter in GHA * Prettier * oh yeah, ??= is a thing * Update comment
This commit is contained in:
@@ -55,20 +55,21 @@ const config: Config = {
|
||||
"!<rootDir>/src/**/*.d.ts",
|
||||
],
|
||||
coverageReporters: ["text-summary", "lcov"],
|
||||
testResultsProcessor: "@casualbot/jest-sonar-reporter",
|
||||
prettierPath: null,
|
||||
moduleDirectories: ["node_modules", "test/test-utils"],
|
||||
};
|
||||
|
||||
// if we're running under GHA, enable the GHA reporter
|
||||
// if we're running under GHA, enable relevant reporters
|
||||
if (env["GITHUB_ACTIONS"] !== undefined) {
|
||||
const reporters: Config["reporters"] = [["github-actions", { silent: false }], "summary"];
|
||||
config.reporters ??= [];
|
||||
config.reporters.push(["github-actions", { silent: false }]);
|
||||
config.reporters.push("summary");
|
||||
config.reporters.push("@casualbot/jest-sonar-reporter");
|
||||
|
||||
// if we're running against the develop branch, also enable the slow test reporter
|
||||
if (env["GITHUB_REF"] == "refs/heads/develop") {
|
||||
reporters.push("<rootDir>/test/slowReporter.cjs");
|
||||
config.reporters.push("<rootDir>/test/slowReporter.cjs");
|
||||
}
|
||||
config.reporters = reporters;
|
||||
}
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user