Configuration file equivalent for --passWithNoTests flag
See original GitHub issue🚀 Feature Proposal
Add a passWithNoTests
boolean support in the configuration file, to have the same effect as the --passWithNoTests
CLI flag.
Motivation
We currently use a shared configuration file across our organization, so that every repo running Jest will have the same default configuration (we do the same for Prettier, TSLint, Webpack, etc.). This ensures consistency, avoids surprises, and lets our teams have a sort of internal “zero conf” set up with the preferences/settings of the engineering organization.
This works really well with Jest, except we are now adding --passWithNoTests
to all our new repos, where a configuration file equivalent would let us do it once.
Example
In jest.config.js
(if using the JS format):
module.exports = {
preset: 'ts-jest',
moduleFileExtensions: ['ts', 'tsx', 'js'],
globals: { 'ts-jest': { tsConfig: 'tsconfig.json' } },
testMatch: ['**/test/**/*.test.(ts|tsx)'],
// ...
passWithNoTests: true,
};
Issue Analytics
- State:
- Created 4 years ago
- Reactions:54
- Comments:17 (2 by maintainers)
Top Results From Across the Web
Configuring Jest
You can use --config flag to pass an explicit path to the file. note. Keep in mind that the resulting configuration object must...
Read more >Jest CLI Options - w3resource
This option will be the CLI equivalent of the projects configuration option. Note, if configuration files are found in the specified paths, all ......
Read more >Test specific file using Jest - Stack Overflow
js will search any child folders from your project root directory, or where jest.config.js at; and match & test the specific test file....
Read more >@nrwl/jest:jest | Nx
It is also helpful to have passWithNoTests: true set so your project doesn't ... The path to a Jest config file specifying how...
Read more >Dynamically matching files in Jest | by Romain Kelifa - Medium
by default, Jest will look for a configuration file named ... --config jest.config.integration.only.js --passWithNoTests""test": "yarn jest ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So… That is not going to happen?
@SimenB I can pick this up, if this feature is needed