diff --git a/apps/web/jest.config.ts b/apps/web/jest.config.ts index 43bfef70ab..2076f4c3fb 100644 --- a/apps/web/jest.config.ts +++ b/apps/web/jest.config.ts @@ -55,20 +55,21 @@ const config: Config = { "!/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("/test/slowReporter.cjs"); + config.reporters.push("/test/slowReporter.cjs"); } - config.reporters = reporters; } export default config;