Adding package.json configuration option, or making the jest-puppeteer config path more flexible
See original GitHub issue🚀 Feature Proposal
How about adding the option to add the configuration parameters directly to package.json as a "jest-puppeteer"
field ?
Motivation
Currently the only place you can add the configuration is in the root of the project with the jest-puppeteer.config.js
file. This seems a bit unyieldy and could be consider “yet another file” for most people with just 3-4 lines of configuration.
The addition of the package.json config option is something that many other libraries provide e.g. jest
, eslint
and others.
Certainly it is not so flexible as a JavaScript file, but could fit many cases.
Another consideration would be to be able to search for the jest-puppeteer.config.js
recursively from the current file running, and use the first one found. This would make it a bit more “clean” as it would allow people to add the jest-puppeteer.config.js
file, closer to where it would belong conceptually.
Note
If this is something wanted, I could begin working on a first implementation 😃
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5
Top GitHub Comments
I would do my best to come with a PR in the coming days @StevenWeathers
I would like to see this, more and more javascript tools are expecting custom configs in root and it really adds up quick. I’ve recently begun trying to move all my tooling configs into a subfolder in effort to clean up the root, and realized this tool doesn’t yet support this.