-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy pathjest-puppeteer.config.js
53 lines (44 loc) · 1.06 KB
/
jest-puppeteer.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
const { HEADLESS } = process.env
/**
* @type {JestPuppeteerConfig}
*/
module.exports = {
browserContext: 'incognito',
/**
* Puppeteer launch options
*/
launch: {
args: [
/**
* Workaround for 'No usable sandbox! Update your kernel' error
* see more https://github.com/Googlechrome/puppeteer/issues/290
*/
'--no-sandbox',
'--disable-setuid-sandbox',
/**
* Prevent empty Chrome startup window
* Tests use their own `browser.newPage()` instead
*/
'--no-startup-window'
],
// Allow headless mode switching using `HEADLESS=false`
headless: HEADLESS !== 'false',
// See launch arg '--no-startup-window'
waitForInitialPage: false
},
/**
* Development server options
*/
server: {
command: 'npx gulp docs:serve',
host: '0.0.0.0',
port: 3000,
// Allow 30 seconds to start server
launchTimeout: 30000,
// Skip when already running
usedPortAction: 'ignore'
}
}
/**
* @import { JestPuppeteerConfig } from 'jest-environment-puppeteer'
*/