Skip to content

Commit

Permalink
updates to puppet
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoffer Åström committed Nov 2, 2017
1 parent 984cb08 commit 83a1642
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/puppeteer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ const puppet = {
process.exit(1);
}
(async function launchAndRun() {
console.log(argv.chrome);
const browser = await puppeteer.launch(argv.chrome);
global.browser = browser;
global.page = await browser.newPage();
const failures = await run(files, argv.mocha);
await browser.close();
process.exit(failures);
}());
},
Expand Down
7 changes: 6 additions & 1 deletion src/puppeteer/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ module.exports = {
},
'chrome.headless': {
description: 'Run chrome headless',
default: false,
default: true,
type: 'boolean',
},
'chrome.args': {
description: 'Chrome flags',
default: [],
type: 'array',
},
};

0 comments on commit 83a1642

Please sign in to comment.