Jest: Configuration file equivalent for --passWithNoTests flag

Created on 30 Aug 2019  路  3Comments  路  Source: facebook/jest

馃殌 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,
};
Feature Request

Most helpful comment

@SimenB I can pick this up, if this feature is needed

All 3 comments

@SimenB I can pick this up, if this feature is needed

Will this be added? @M4rk9696 Thanks!

So... That is not going to happen?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ticky picture ticky  路  3Comments

Antho2407 picture Antho2407  路  3Comments

hramos picture hramos  路  3Comments

paularmstrong picture paularmstrong  路  3Comments

stephenlautier picture stephenlautier  路  3Comments