Closed
Description
🚀 Feature Proposal
For now, when we want to configure jest we have three choices :
- put the jest config in
package.json
- put the jest config in
jest.config.js
at root
In both this previous choices, you can easily run your tests with a simplejest
command. - put the jest config in
whatYouWant.js
anywhere in your project
With this last choice you have to runjest -c ./path/to/whatYouWant.js
Motivation
The idea is to run a simple jest
command in any of the three cases.
Example
The idea should be to add a new option in package.json
. It may be something like defaultConfigFile
:
{
"name": "myModule",
"jest" : {
"defaultConfigFile": "./path/to/whatYouWant.js"
}
}
In this case, it's the only option in package.json
, which override the default config file search at root. The rest of the config stays in your whatYouWant.js
Pitch
Why does this feature belong in the Jest core platform?
Because it's a native configuration proposal.