Skip to content
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

[Feature]: Global / system wide config ? #14925

Closed
DrakaSAN opened this issue Feb 28, 2024 · 4 comments
Closed

[Feature]: Global / system wide config ? #14925

DrakaSAN opened this issue Feb 28, 2024 · 4 comments

Comments

@DrakaSAN
Copy link

🚀 Feature Proposal

Have a configuration file in a standardized place (~/jest.config.js|ts|mjs|cjs|json ?) that will be used in all jest process started on the machine.

To prevent foot gun, this could be limited to a subset of the configuration

This config file would have a priority in between jest default and project config file, so the project config would still have the final word

Motivation

This will allow to override project-specific configuration for things that will always affect some machine, for example, it could allow to have such a file define maxConcurrency or maxWorkers in a CI runner by simply having the runner be built with this file, instead of having to define the CI job to start with flags for all of that runner specific config

For people where the default for maxWorkers is misbehaving for whatever reason, it could also allow them to set a new default system wide and be able to start tests on projects the same way as their team without risking having their machine slow to a crawl

Example

Somebody have node reporting a number of CPU that makes jest maxWorkers default misbehave and slow down their machine. Define the file on system wide file with maxWorkers: 4 (or whatever number works for them). This will override jest default, and still allow that project that needs to have tests runs with maxWorkers: 1 to work

Somebody likes to be notified for everything, but their personal preference is rejected by the other team members. That person can defined notify: true, notifyMode: always and have notifications on their machine without having the config file always showing as modified

Pitch

Configuring jest looks like something that should be part of jest itself ?

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Mar 29, 2024
Copy link

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

1 similar comment
Copy link

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant