Skip to content

Commit 0c8ec82

Browse files
committed
fix: UTs
1 parent a5407e5 commit 0c8ec82

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/helper/Puppeteer.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,11 @@ class Puppeteer extends Helper {
659659
this.isAuthenticated = true;
660660
}
661661
}
662-
const fileName = `${`${global.output_dir}${path.sep}trace${path.sep}${uuidv4()}_${clearString(this.currentRunningTest.title)}`.slice(0, 245)}.json`;
663-
const dir = path.dirname(fileName);
664-
if (!fileExists(dir)) fs.mkdirSync(dir);
662+
665663
if (this.options.trace) {
664+
const fileName = `${`${global.output_dir}${path.sep}trace${path.sep}${uuidv4()}_${clearString(this.currentRunningTest.title)}`.slice(0, 245)}.json`;
665+
const dir = path.dirname(fileName);
666+
if (!fileExists(dir)) fs.mkdirSync(dir);
666667
await this.page.tracing.start({ screenshots: true, path: fileName });
667668
this.currentRunningTest.artifacts.trace = fileName;
668669
}

0 commit comments

Comments
 (0)