Jest-puppeteer: Add support for Firefox thx to puppeteer-firefox

Created on 13 Dec 2018  路  4Comments  路  Source: smooth-code/jest-puppeteer

Add support for Firefox thanks to puppeteer-firefox :heart_eyes_cat:

feature request 馃檹

Most helpful comment

I quickly tried to use jest-puppeteer with puppeteer-firefox by renaming node_modules/puppeteer-firefox to node_modules/puppeteer and I could run my (well, currently very limited set of) tests just fine!

Grepping for the puppeteer imports in this project it seems like this is limited to only these two lines:

https://github.com/smooth-code/jest-puppeteer/blob/f3bb9415e52207f5f4d293aee3bf7783e1bccce9/packages/jest-environment-puppeteer/src/global.js#L8

https://github.com/smooth-code/jest-puppeteer/blob/f3bb9415e52207f5f4d293aee3bf7783e1bccce9/packages/jest-environment-puppeteer/src/PuppeteerEnvironment.js#L3

Would you take a PR that links those to a seperate file which can be configured to either load puppeteer (default) or puppeteer-firefox (opt in)? Do you have any better ideas to do that? 馃檪

All 4 comments

This project is experimental. 馃悐 live here.

I quickly tried to use jest-puppeteer with puppeteer-firefox by renaming node_modules/puppeteer-firefox to node_modules/puppeteer and I could run my (well, currently very limited set of) tests just fine!

Grepping for the puppeteer imports in this project it seems like this is limited to only these two lines:

https://github.com/smooth-code/jest-puppeteer/blob/f3bb9415e52207f5f4d293aee3bf7783e1bccce9/packages/jest-environment-puppeteer/src/global.js#L8

https://github.com/smooth-code/jest-puppeteer/blob/f3bb9415e52207f5f4d293aee3bf7783e1bccce9/packages/jest-environment-puppeteer/src/PuppeteerEnvironment.js#L3

Would you take a PR that links those to a seperate file which can be configured to either load puppeteer (default) or puppeteer-firefox (opt in)? Do you have any better ideas to do that? 馃檪

Hello @philipp-spiess, it's a very good news! I think we could provide support for it in future!

Related to #312 (_Puppeteer v2.1.0 supports Firefox out-of-the-box_)

Was this page helpful?
0 / 5 - 0 ratings