mirror of
https://github.com/waku-org/js-waku.git
synced 2025-02-23 09:38:24 +00:00
chore: fix logging spec
This commit is contained in:
parent
dd4788ff55
commit
76ec0d5a80
@ -34,32 +34,30 @@ async function main() {
|
|||||||
if (process.env.CI) {
|
if (process.env.CI) {
|
||||||
const reportsDir = getPackagePath("reports");
|
const reportsDir = getPackagePath("reports");
|
||||||
const reportFile = resolve(reportsDir, "mocha-results.json");
|
const reportFile = resolve(reportsDir, "mocha-results.json");
|
||||||
const configFile = resolve(reportsDir, "config.json");
|
|
||||||
|
|
||||||
await mkdir(reportsDir, { recursive: true });
|
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 = {
|
const reporterConfig = {
|
||||||
reporterEnabled: "spec",
|
reporterEnabled: "spec, json",
|
||||||
reporterOptions: {
|
reporterOptions: {
|
||||||
json: {
|
json: {
|
||||||
stdout: false,
|
|
||||||
options: {
|
|
||||||
output: reportFile
|
output: reportFile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Write the config file
|
await writeFile(
|
||||||
await writeFile(configFile, JSON.stringify(reporterConfig, null, 2));
|
getPackagePath("reporter-config.json"),
|
||||||
|
JSON.stringify(reporterConfig, null, 2)
|
||||||
// Add a separate JSON reporter directly
|
|
||||||
mochaArgs.push(
|
|
||||||
"--reporter-option",
|
|
||||||
`output=${reportFile}`,
|
|
||||||
"--reporter",
|
|
||||||
"json"
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// In non-CI environments, just use spec reporter
|
// In non-CI environments, just use spec reporter
|
||||||
|
@ -45,7 +45,7 @@ import {
|
|||||||
} from "./utils.js";
|
} from "./utils.js";
|
||||||
|
|
||||||
describe("Waku Store, general", function () {
|
describe("Waku Store, general", function () {
|
||||||
this.timeout(15000);
|
this.timeout(120000);
|
||||||
let waku: LightNode;
|
let waku: LightNode;
|
||||||
let waku2: LightNode;
|
let waku2: LightNode;
|
||||||
let nwaku: ServiceNode;
|
let nwaku: ServiceNode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user