add support for passing chrome path as env var

pull/21833/head
Bruno Windels 2018-07-27 15:15:10 +02:00
parent 20becf8735
commit edf37e3592
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@ global.browser = null;
async function runTests() {
console.log("running tests ...");
global.browser = await puppeteer.launch();
const options = {};
if (process.env.CHROME_PATH) {
options.executablePath = process.env.CHROME_PATH;
}
global.browser = await puppeteer.launch(options);
const page = await helpers.newPage();
const username = 'user-' + helpers.randomInt(10000);