jest-validate
Advanced tools
Comparing version 19.0.2 to 19.1.0-alpha.eed82034
@@ -15,13 +15,8 @@ /** | ||
const validationCondition = ( | ||
option, | ||
validOption) => | ||
{ | ||
return ( | ||
option === null || | ||
option === undefined || | ||
toString.call(option) === toString.call(validOption)); | ||
const validationCondition = (option, validOption) => { | ||
return option === null || | ||
option === undefined || | ||
toString.call(option) === toString.call(validOption); | ||
}; | ||
module.exports = validationCondition; |
@@ -25,4 +25,3 @@ /** | ||
{ | ||
const message = | ||
` Option ${chalk.bold(`"${option}"`)} must be of type: | ||
const message = ` Option ${chalk.bold(`"${option}"`)} must be of type: | ||
${chalk.bold.green(getType(defaultValue))} | ||
@@ -29,0 +28,0 @@ but instead received: |
@@ -56,5 +56,3 @@ /** | ||
return suggestion ? | ||
`Did you mean ${chalk.bold(format(suggestion))}?` : | ||
''; | ||
return suggestion ? `Did you mean ${chalk.bold(format(suggestion))}?` : ''; | ||
}; | ||
@@ -61,0 +59,0 @@ |
@@ -29,7 +29,8 @@ /** | ||
{ | ||
const didYouMean = | ||
createDidYouMeanMessage(option, Object.keys(exampleConfig)); | ||
const didYouMean = createDidYouMeanMessage( | ||
option, | ||
Object.keys(exampleConfig)); | ||
/* eslint-disable max-len */ | ||
const message = | ||
` Unknown option ${chalk.bold(`"${option}"`)} with value ${chalk.bold(format(config[option]))} was found.` + ( | ||
const message = ` Unknown option ${chalk.bold(`"${option}"`)} with value ${chalk.bold(format(config[option]))} was found.` + ( | ||
didYouMean && ` ${didYouMean}`) + | ||
@@ -36,0 +37,0 @@ `\n This is probably a typing mistake. Fixing it will remove this message.`; |
{ | ||
"name": "jest-validate", | ||
"version": "19.0.2", | ||
"version": "19.1.0-alpha.eed82034", | ||
"repository": { | ||
@@ -11,7 +11,7 @@ "type": "git", | ||
"dependencies": { | ||
"chalk": "^1.1.1", | ||
"jest-matcher-utils": "^19.0.0", | ||
"leven": "^2.0.0", | ||
"pretty-format": "^19.0.0" | ||
"chalk": "^1.1.3", | ||
"jest-matcher-utils": "^19.1.0-alpha.eed82034", | ||
"leven": "^2.1.0", | ||
"pretty-format": "^19.1.0-alpha.eed82034" | ||
} | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
15476
14
0
288
2
+ Addedjest-matcher-utils@19.1.0-alpha.eed82034(transitive)
+ Addedpretty-format@19.1.0-alpha.eed82034(transitive)
- Removedjest-matcher-utils@19.0.0(transitive)
- Removedpretty-format@19.0.0(transitive)
Updatedchalk@^1.1.3
Updatedleven@^2.1.0