Add env variable PUPPETEER_OPEN_CHROME to decide whether to open chrome in test or not

This commit is contained in:
Peter Maquiran
2021-07-10 09:54:13 +01:00
parent 9f2e224a9a
commit 64a17b7283
4 changed files with 8 additions and 4 deletions
+4 -3
View File
@@ -2,16 +2,17 @@
require('dotenv').config()
const port = process.env.PUPPETEER_PORT
const host = process.env.PUPPETEER_HOST
const openChrome = process.env.PUPPETEER_OPEN_CHROME
module.exports = {
server: {
command: `http-server --port ${port} ./www`,
command: `http-server -a 127.0.0.1 --port ${port} ./www`,
port: port,
launchTimeout: 5000
},
launch: {
dumpio: true,
headless: false,
headless: openChrome != 'true',
},
}