-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"useDocker: true" does not allow configuring puppeteer via jest-puppeteer.config.js #75
Comments
Just thinking loud about the potential solutions. I found jest-puppeteer-docker library that could potentially be used instead of the Docker integration in this plugin. I'll try to make it work on my end at some point, maybe we could remove all the custom Docker code here and instead document how to configure these plugins together? |
Few months ago I've tried to do the same. Now I think that there is no way to achieve same font rendering in docker and local chromium (docker and macOS in my case). Integration with jest-puppeteer-docker will be useful anyway. |
Have you tried to add this argument to the "dockerCommand" option in jest-puppeteer-react.config.js? |
I'm not sure how I can add puppeteer options to the docker image command? I eventually forked this lib and made some changes to it. Ended up with the following config:
Basically, I changed it so the lib always uses "it's own" jest-puppeteer config and allows adding props to it in jest-puppeteer-react.config.js (similar behavior for both use cases + less config files). Either way, I'd like to discard my internal fork if there's a better solution in here. |
I thought you wanted to add a Chrome argument, not a puppeteer option. I like the idea of having one config file and adding a "jestPuppeteerConfig" section. |
The related issue |
Background
We've been battling with some text rendering differences on my local machine and in CI. We have jest-puppeteer-react configured so that it uses docker locally and does not use docker in CI (as it's already a docker environment).
We tried to configure puppeteer the following way - we added the
--font-render-hinting=medium
option to minimize the text rendering differences.Bug description
the
jest-puppeteer.config.js
config is only used by jest-puppeteer ifuseDocker: false
is specified in jest-puppeteer-react.config.js. To verify that, I logged the jest-puppeteer config to my console.With
useDocker: false
:With
useDocker: true
:Note that the
launch
object is empty when using docker.Expected behavior
Puppeteer config should be loaded in regardless of the
useDocker
setting.The text was updated successfully, but these errors were encountered: