Skip to content

Commit 7b484a8

Browse files
committed
feat: add support for defaultViewport option
All future options will be supported since all launch options are now forwarded to connect.
1 parent e454973 commit 7b484a8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

packages/jest-environment-puppeteer/src/PuppeteerEnvironment.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,7 @@ class PuppeteerEnvironment extends NodeEnvironment {
3737
throw new Error('wsEndpoint not found')
3838
}
3939
this.global.browser = await puppeteer.connect({
40-
slowMo:
41-
config && config.launch && config.launch.slowMo
42-
? config.launch.slowMo
43-
: undefined,
44-
ignoreHTTPSErrors:
45-
config && config.launch && config.launch.ignoreHTTPSErrors
46-
? config.launch.ignoreHTTPSErrors
47-
: undefined,
40+
...config.launch,
4841
browserWSEndpoint: wsEndpoint,
4942
})
5043
this.global.page = await this.global.browser.newPage()

0 commit comments

Comments
 (0)