jest-config
Advanced tools
Comparing version 13.3.0-alpha.g8b48d59 to 13.4.0-alpha.d2632006
@@ -42,2 +42,3 @@ /** | ||
notify: false, | ||
preset: null, | ||
testEnvData: {}, | ||
@@ -50,5 +51,4 @@ testEnvironment: 'jest-environment-jsdom', | ||
testRegex: '__tests__/.*\.js$', | ||
testReporter: require.resolve('./reporters/IstanbulTestReporter'), | ||
testURL: 'about:blank', | ||
useStderr: false, | ||
verbose: false }; |
@@ -89,5 +89,37 @@ /** | ||
if (!config.hasOwnProperty('rootDir')) { | ||
throw new Error('No rootDir config value found!');} | ||
throw new Error(`Jest: 'rootDir' config value must be specified.`);} | ||
if (config.preset) { | ||
const presetPath = _replaceRootDirTags(config.rootDir, config.preset); | ||
const presetModule = Resolver.findNodeModule( | ||
path.join(presetPath, 'jest-preset.json'), | ||
{ | ||
basedir: config.rootDir }); | ||
if (presetModule) { | ||
const preset = require(presetModule); | ||
if (config.setupFiles) { | ||
config.setupFiles = preset.setupFiles.concat(config.setupFiles);} | ||
if (config.modulePathIgnorePatterns) { | ||
config.modulePathIgnorePatterns = preset.modulePathIgnorePatterns. | ||
concat(config.modulePathIgnorePatterns);} | ||
if (config.moduleNameMapper) { | ||
config.moduleNameMapper = Object.assign( | ||
{}, | ||
preset.moduleNameMapper, | ||
config.moduleNameMapper);} | ||
config = Object.assign({}, preset, config);} else | ||
{ | ||
throw new Error( | ||
`Jest: Preset '${ config.preset }' not found.`);}} | ||
config.rootDir = path.normalize(config.rootDir); | ||
@@ -135,4 +167,2 @@ | ||
if (config.testRunner === 'jasmine1') { | ||
config.testRunner = require.resolve('jest-jasmine1');} else | ||
if (!config.testRunner || config.testRunner === 'jasmine2') { | ||
@@ -276,5 +306,5 @@ config.testRunner = require.resolve('jest-jasmine2');} else | ||
case 'persistModuleRegistryBetweenSpecs': | ||
case 'preset': | ||
case 'replname': | ||
case 'rootDir': | ||
case 'updateSnapshot': | ||
case 'testEnvData': | ||
@@ -285,2 +315,3 @@ case 'testEnvironment': | ||
case 'testURL': | ||
case 'updateSnapshot': | ||
case 'usesBabelJest': | ||
@@ -295,3 +326,3 @@ case 'verbose': | ||
`Error: Unknown config option "${ key }" with value ` + | ||
`"${ config[key] }". This is either a typing error or another user ` + | ||
`"${ config[key] }". This is either a typing error or a user ` + | ||
`mistake and fixing it will remove this message.`);} | ||
@@ -298,0 +329,0 @@ |
{ | ||
"name": "jest-config", | ||
"version": "13.3.0-alpha.g8b48d59", | ||
"version": "13.4.0-alpha.d2632006", | ||
"repository": { | ||
@@ -12,12 +12,10 @@ "type": "git", | ||
"chalk": "^1.1.1", | ||
"istanbul": "^0.4.2", | ||
"jest-environment-jsdom": "^13.3.0-alpha.g8b48d59", | ||
"jest-environment-node": "^13.3.0-alpha.g8b48d59", | ||
"jest-jasmine1": "^13.3.0-alpha.g8b48d59", | ||
"jest-jasmine2": "^13.3.0-alpha.g8b48d59", | ||
"jest-mock": "^13.3.0-alpha.g8b48d59", | ||
"jest-resolve": "^13.3.0-alpha.g8b48d59", | ||
"jest-util": "^13.3.0-alpha.g8b48d59", | ||
"json-stable-stringify": "^1.0.0", | ||
"node-notifier": "^4.6.0" | ||
"istanbul": "^0.4.4", | ||
"jest-environment-jsdom": "^13.4.0-alpha.d2632006", | ||
"jest-environment-node": "^13.4.0-alpha.d2632006", | ||
"jest-jasmine2": "^13.4.0-alpha.d2632006", | ||
"jest-mock": "^13.4.0-alpha.d2632006", | ||
"jest-resolve": "^13.4.0-alpha.d2632006", | ||
"jest-util": "^13.4.0-alpha.d2632006", | ||
"json-stable-stringify": "^1.0.0" | ||
}, | ||
@@ -24,0 +22,0 @@ "jest": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9
18103
11
461
6
+ Addedjest-diff@13.4.0-alpha.d2632006(transitive)
+ Addedjest-environment-jsdom@13.4.0-alpha.d2632006(transitive)
+ Addedjest-environment-node@13.4.0-alpha.d2632006(transitive)
+ Addedjest-file-exists@13.4.0-alpha.d2632006(transitive)
+ Addedjest-haste-map@13.4.0-alpha.d2632006(transitive)
+ Addedjest-jasmine2@13.4.0-alpha.d2632006(transitive)
+ Addedjest-matcher-utils@13.4.0-alpha.d2632006(transitive)
+ Addedjest-matchers@13.4.0-alpha.d2632006(transitive)
+ Addedjest-mock@13.4.0-alpha.d2632006(transitive)
+ Addedjest-resolve@13.4.0-alpha.d2632006(transitive)
+ Addedjest-snapshot@13.4.0-alpha.d2632006(transitive)
+ Addedjest-util@13.4.0-alpha.d2632006(transitive)
- Removedjest-jasmine1@^13.3.0-alpha.g8b48d59
- Removednode-notifier@^4.6.0
- Removedansi-escapes@3.2.0(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedansicolors@0.3.2(transitive)
- Removedcardinal@2.1.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcli-table@0.3.11(transitive)
- Removedcli-usage@0.1.10(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedcolors@1.0.3(transitive)
- Removedgrowly@1.3.0(transitive)
- Removedhas-flag@2.0.03.0.0(transitive)
- Removedjest-diff@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-environment-jsdom@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-environment-node@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-haste-map@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-jasmine1@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-jasmine2@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-matcher-utils@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-matchers@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-mock@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-resolve@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-snapshot@13.3.0-alpha.g8b48d59(transitive)
- Removedjest-util@13.3.0-alpha.g8b48d59(transitive)
- Removedlodash@4.17.21(transitive)
- Removedlodash._arraycopy@3.0.0(transitive)
- Removedlodash._arrayeach@3.0.0(transitive)
- Removedlodash._baseassign@3.2.0(transitive)
- Removedlodash._baseclone@3.3.0(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basefor@3.0.3(transitive)
- Removedlodash._bindcallback@3.0.1(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash.clonedeep@3.0.2(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedmarked@0.7.0(transitive)
- Removedmarked-terminal@3.3.0(transitive)
- Removednode-emoji@1.11.0(transitive)
- Removednode-notifier@4.6.1(transitive)
- Removedredeyed@2.1.1(transitive)
- Removedsemver@5.7.2(transitive)
- Removedshellwords@0.1.1(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedsupports-hyperlinks@1.0.1(transitive)
Updatedistanbul@^0.4.4