1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-06 12:02:40 +03:00

Always show a summary after Jest tests (#3440)

... because it is otherwise impossible to see what failed.
This commit is contained in:
Richard van der Hoff
2023-06-02 18:38:17 +01:00
committed by GitHub
parent 858155e0ef
commit dfb079a76f

View File

@@ -23,11 +23,19 @@ const config: Config = {
collectCoverageFrom: ["<rootDir>/src/**/*.{js,ts}"], collectCoverageFrom: ["<rootDir>/src/**/*.{js,ts}"],
coverageReporters: ["text-summary", "lcov"], coverageReporters: ["text-summary", "lcov"],
testResultsProcessor: "@casualbot/jest-sonar-reporter", testResultsProcessor: "@casualbot/jest-sonar-reporter",
// Always print out a summary if there are any failing tests. Normally
// a summary is only printed if there are more than 20 test *suites*.
reporters: [["default", { summaryThreshold: 0 }]],
}; };
// if we're running under GHA, enable the GHA reporter // if we're running under GHA, enable the GHA reporter
if (env["GITHUB_ACTIONS"] !== undefined) { if (env["GITHUB_ACTIONS"] !== undefined) {
const reporters: Config["reporters"] = [["github-actions", { silent: false }], "summary"]; const reporters: Config["reporters"] = [
["github-actions", { silent: false }],
// as above: always show a summary if there were any failing tests.
["summary", { summaryThreshold: 0 }],
];
// if we're running against the develop branch, also enable the slow test reporter // if we're running against the develop branch, also enable the slow test reporter
if (env["GITHUB_REF"] == "refs/heads/develop") { if (env["GITHUB_REF"] == "refs/heads/develop") {