Skip to content

Commit

Permalink
feat(dev-deps): Test new headless mode puppeteer
Browse files Browse the repository at this point in the history
  • Loading branch information
Desplandis committed Dec 11, 2023
1 parent ffea777 commit 87f705b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/hooks_functional.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,11 @@ exports.mochaHooks = {
args.push(`--remote-debugging-port=${process.env.REMOTE_DEBUGGING}`);
}

// https://developer.chrome.com/articles/new-headless/
const headless = !process.env.DEBUG && 'new';
browser = await puppeteer.launch({
executablePath: process.env.CHROME,
headless: !process.env.DEBUG,
headless,
devtools: !!process.env.DEBUG,
defaultViewport: { width: 400, height: 300 },
args,
Expand Down

0 comments on commit 87f705b

Please sign in to comment.