File tree Expand file tree Collapse file tree 2 files changed +23
-6
lines changed
packages/jest-environment-puppeteer Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,17 @@ const DEFAULT_CONFIG = {
11
11
browserContext : 'default' ,
12
12
exitOnPageError : true ,
13
13
}
14
- const DEFAULT_CONFIG_CI = {
14
+ const DEFAULT_CONFIG_CI = merge ( DEFAULT_CONFIG , {
15
15
launch : {
16
- args : [ '--no-sandbox' , '--disable-setuid-sandbox' ] ,
17
- } ,
18
- browserContext : 'default' ,
19
- exitOnPageError : true ,
20
- }
16
+ args : [
17
+ '--no-sandbox' ,
18
+ '--disable-setuid-sandbox' ,
19
+ '--disable-background-timer-throttling' ,
20
+ '--disable-backgrounding-occluded-windows' ,
21
+ '--disable-renderer-backgrounding'
22
+ ] ,
23
+ }
24
+ } )
21
25
22
26
async function readConfig ( ) {
23
27
const defaultConfig =
Original file line number Diff line number Diff line change @@ -54,5 +54,18 @@ describe('readConfig', () => {
54
54
const config = await readConfig ( )
55
55
expect ( config . server ) . not . toBeDefined ( )
56
56
} )
57
+
58
+ it ( 'should return default config with launch args' , async ( ) => {
59
+ mockExists ( false )
60
+ process . env . CI = true
61
+ const config = await readConfig ( )
62
+ expect ( config . launch . args ) . toEqual ( [
63
+ '--no-sandbox' ,
64
+ '--disable-setuid-sandbox' ,
65
+ '--disable-background-timer-throttling' ,
66
+ '--disable-backgrounding-occluded-windows' ,
67
+ '--disable-renderer-backgrounding'
68
+ ] )
69
+ } )
57
70
} )
58
71
} )
You can’t perform that action at this time.
0 commit comments