2021-07-10 08:45:51 +01:00
|
|
|
// jest-puppeteer.config.js
|
2021-07-10 09:11:03 +01:00
|
|
|
require('dotenv').config()
|
|
|
|
|
|
|
|
|
|
const port = process.env.PUPPETEER_PORT
|
2021-07-10 09:54:13 +01:00
|
|
|
const host = process.env.PUPPETEER_HOST
|
|
|
|
|
const openChrome = process.env.PUPPETEER_OPEN_CHROME
|
2021-07-15 12:29:37 +01:00
|
|
|
const chromPath = process.env.PUPPETEER_CHROME_PATH
|
2021-07-10 09:11:03 +01:00
|
|
|
|
2021-07-10 08:45:51 +01:00
|
|
|
module.exports = {
|
|
|
|
|
server: {
|
2021-07-10 09:54:13 +01:00
|
|
|
command: `http-server -a 127.0.0.1 --port ${port} ./www`,
|
2021-07-10 09:11:03 +01:00
|
|
|
port: port,
|
2023-02-22 09:31:14 +01:00
|
|
|
launchTimeout: 10000
|
2021-07-10 08:45:51 +01:00
|
|
|
},
|
|
|
|
|
launch: {
|
|
|
|
|
dumpio: true,
|
2021-07-10 09:54:13 +01:00
|
|
|
headless: openChrome != 'true',
|
2021-07-11 07:36:41 +01:00
|
|
|
product: 'chrome',
|
2021-07-14 22:10:22 +01:00
|
|
|
args: [`--window-size=1200,1080`],
|
|
|
|
|
defaultViewport: {
|
|
|
|
|
width:1200,
|
|
|
|
|
height:1080
|
2021-07-15 11:53:16 +01:00
|
|
|
},
|
2021-07-15 12:29:37 +01:00
|
|
|
executablePath: chromPath
|
2021-07-10 08:45:51 +01:00
|
|
|
},
|
2021-07-11 07:36:41 +01:00
|
|
|
browserContext: 'default',
|
2021-07-14 22:10:22 +01:00
|
|
|
|
2021-07-10 08:45:51 +01:00
|
|
|
}
|