question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 4 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

3reactions
igneel64commented, Apr 23, 2020

I would do my best to come with a PR in the coming days @StevenWeathers

3reactions
StevenWeatherscommented, Apr 23, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Jest
It is recommended to define the configuration in a dedicated JavaScript, TypeScript or JSON file. The file will be discovered automatically, if ...
Read more >
Configuring package.json · Jest
Configuring package.json. Jest's configuration can be defined in the package.json file of your project or through the --config <path/to/json> option.
Read more >
jest-playwright-preset - npm Package Health Analysis - Snyk
Learn more about jest-playwright-preset: package health score, ... Configuration options can be specified using a jest-playwright.config.js file at the root ...
Read more >
wordpress/jest-puppeteer-axe | Block Editor Handbook
npm install @wordpress/jest-puppeteer-axe --save-dev ... of Axe rules to skip from verification. options – a flexible way to configure how Axe run operates....
Read more >
Jest mock custom hook - Caritas Castellaneta
*If you set up using React Native CLI, skip down to Install Testing Library. Then, we configure a server to use these default...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found