diff --git a/packages/tests/package.json b/packages/tests/package.json index 06c6e97f42..84811eca4b 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -86,6 +86,6 @@ "interface-datastore": "^8.2.10", "libp2p": "2.1.8", "mocha": "^10.3.0", - "npm-run-all": "^4.1.5" + "npm-run-all": "^4.1.5" } } diff --git a/packages/tests/src/run-tests.js b/packages/tests/src/run-tests.js index 6605baeced..8dbff55a56 100644 --- a/packages/tests/src/run-tests.js +++ b/packages/tests/src/run-tests.js @@ -34,32 +34,30 @@ async function main() { if (process.env.CI) { const reportsDir = getPackagePath("reports"); const reportFile = resolve(reportsDir, "mocha-results.json"); - const configFile = resolve(reportsDir, "config.json"); await mkdir(reportsDir, { recursive: true }); - // Create a clean reporter config + // Use both spec and JSON reporters in CI + mochaArgs.push( + "--reporter", + "mocha-multi-reporters", + "--reporter-options", + `configFile=${getPackagePath("reporter-config.json")}` + ); + + // Create reporter config file const reporterConfig = { - reporterEnabled: "spec", + reporterEnabled: "spec, json", reporterOptions: { json: { - stdout: false, - options: { - output: reportFile - } + output: reportFile } } }; - // Write the config file - await writeFile(configFile, JSON.stringify(reporterConfig, null, 2)); - - // Add a separate JSON reporter directly - mochaArgs.push( - "--reporter-option", - `output=${reportFile}`, - "--reporter", - "json" + await writeFile( + getPackagePath("reporter-config.json"), + JSON.stringify(reporterConfig, null, 2) ); } else { // In non-CI environments, just use spec reporter diff --git a/packages/tests/tests/store/index.node.spec.ts b/packages/tests/tests/store/index.node.spec.ts index d9a055fb3e..d30a66e8d4 100644 --- a/packages/tests/tests/store/index.node.spec.ts +++ b/packages/tests/tests/store/index.node.spec.ts @@ -45,7 +45,7 @@ import { } from "./utils.js"; describe("Waku Store, general", function () { - this.timeout(15000); + this.timeout(120000); let waku: LightNode; let waku2: LightNode; let nwaku: ServiceNode;