MCPcopy
hub / github.com/signalapp/Signal-Desktop / saveLogs

Method saveLogs

ts/test-mock/bootstrap.node.ts:603–625  ·  view source on GitHub ↗
(
    app: App | undefined = this.#lastApp,
    testName?: string
  )

Source from the content-addressed store, hash-verified

601 }
602
603 public async saveLogs(
604 app: App | undefined = this.#lastApp,
605 testName?: string
606 ): Promise<void> {
607 const outDir = await this.#getArtifactsDir(testName);
608 if (outDir == null) {
609 return;
610 }
611
612 // oxlint-disable-next-line no-console
613 console.error(`Saving logs to ${outDir}`);
614
615 const { logsDir } = this;
616 await fs.rename(logsDir, path.join(outDir, 'logs'));
617
618 const page = await app?.getWindow();
619 if (process.env.TRACING) {
620 await page
621 ?.context()
622 .tracing.stop({ path: path.join(outDir, 'trace.zip') });
623 }
624 await this.screenshot(app, testName);
625 }
626
627 public async createScreenshotComparator(
628 app: App,

Callers 4

maybeSaveLogsMethod · 0.95
runBenchmarkMethod · 0.95
mochaGlobalSetupFunction · 0.95
initStorageFunction · 0.95

Calls 5

#getArtifactsDirMethod · 0.95
screenshotMethod · 0.95
getWindowMethod · 0.80
errorMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected