mirror of
https://github.com/waku-org/js-waku.git
synced 2025-02-22 17:18:15 +00:00
chore: fix logging spec
This commit is contained in:
parent
dd4788ff55
commit
76ec0d5a80
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user