| | |
| | | |
| | | if (!reporter) { |
| | | throw new (_jestResolve().default.ModuleNotFoundError)( |
| | | `Could not resolve a module for a custom reporter.\n` + |
| | | 'Could not resolve a module for a custom reporter.\n' + |
| | | ` Module name: ${reporterPath}` |
| | | ); |
| | | } |
| | |
| | | console.log( |
| | | _chalk().default.red( |
| | | ` Invalid testPattern ${testPathPattern} supplied. ` + |
| | | `Running all tests instead.` |
| | | 'Running all tests instead.' |
| | | ) |
| | | ); |
| | | }; |
| | |
| | | value = oldOptions[key]; |
| | | |
| | | if ( |
| | | Array.isArray(value) && |
| | | Array.isArray(value) && // If it's the wrong type, it can throw at a later time |
| | | (options.runner === undefined || |
| | | options.runner === _Defaults.default.runner) && // Only require 'js' for the default jest-runner |
| | | !value.includes('js') |
| | | ) { |
| | | const errorMessage = |
| | | ` moduleFileExtensions must include 'js':\n` + |
| | | ` but instead received:\n` + |
| | | " moduleFileExtensions must include 'js':\n" + |
| | | ' but instead received:\n' + |
| | | ` ${_chalk().default.bold.red(JSON.stringify(value))}`; // If `js` is not included, any dependency Jest itself injects into |
| | | // the environment, like jasmine or sourcemap-support, will need to |
| | | // `require` its modules with a file extension. This is not plausible |