Skip to content

Commit ad6158d

Browse files
committed
🐛 fix: Typo in screenshot path
1 parent 7609b00 commit ad6158d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/browser.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,13 @@ export const visitPaperPage = async (browser, target, options = {}) => {
6565
console.log(`Creating tmp directory in ${root}/tmp`);
6666
fs.mkdirSync(`${root}/tmp`);
6767
}
68-
let screenshotPath = `${root}/tmp/screenshot_${Date.now()}_${target
68+
let screenshotName = `screenshot_${Date.now()}_${target
6969
.replaceAll("https://", "")
7070
.replaceAll("/", "__")}.jpg`;
71-
screenshotPath = screenshotPath
71+
screenshotName = screenshotName
7272
.replace(/[^a-zA-Z0-9\-_\.]/g, "")
7373
.slice(0, 100);
74+
const screenshotPath = `${root}/tmp/${screenshotName}`;
7475
await p.screenshot({
7576
path: screenshotPath,
7677
fullPage: true,

0 commit comments

Comments
 (0)