jest-validate
Advanced tools
Comparing version 28.0.0-alpha.5 to 28.0.0-alpha.6
@@ -48,3 +48,3 @@ 'use strict'; | ||
const message = ` Option ${_chalk().default.bold( | ||
`"${path && path.length > 0 ? path.join('.') + '.' : ''}${option}"` | ||
`"${path && path.length > 0 ? `${path.join('.')}.` : ''}${option}"` | ||
)} must be of type: | ||
@@ -51,0 +51,0 @@ ${validTypes.map(e => _chalk().default.bold.green(e)).join(' or ')} |
@@ -87,6 +87,6 @@ 'use strict'; | ||
super(); | ||
comment = comment ? '\n\n' + comment : '\n'; | ||
comment = comment ? `\n\n${comment}` : '\n'; | ||
this.name = ''; | ||
this.message = _chalk().default.red( | ||
_chalk().default.bold(name) + ':\n\n' + message + comment | ||
`${_chalk().default.bold(name)}:\n\n${message}${comment}` | ||
); | ||
@@ -100,6 +100,6 @@ Error.captureStackTrace(this, () => {}); | ||
const logValidationWarning = (name, message, comment) => { | ||
comment = comment ? '\n\n' + comment : '\n'; | ||
comment = comment ? `\n\n${comment}` : '\n'; | ||
console.warn( | ||
_chalk().default.yellow( | ||
_chalk().default.bold(name) + ':\n\n' + message + comment | ||
`${_chalk().default.bold(name)}:\n\n${message}${comment}` | ||
) | ||
@@ -106,0 +106,0 @@ ); |
@@ -70,6 +70,5 @@ 'use strict'; | ||
: ''; | ||
message = | ||
` Unrecognized option ${_chalk().default.bold( | ||
(0, _utils.format)(unrecognized) | ||
)}.` + (didYouMeanMessage ? ` ${didYouMeanMessage}` : ''); | ||
message = ` Unrecognized option ${_chalk().default.bold( | ||
(0, _utils.format)(unrecognized) | ||
)}.${didYouMeanMessage ? ` ${didYouMeanMessage}` : ''}`; | ||
} else { | ||
@@ -76,0 +75,0 @@ title += 's'; |
@@ -35,10 +35,9 @@ 'use strict'; | ||
); | ||
const message = | ||
` Unknown option ${_chalk().default.bold( | ||
`"${path && path.length > 0 ? path.join('.') + '.' : ''}${option}"` | ||
)} with value ${_chalk().default.bold( | ||
(0, _utils.format)(config[option]) | ||
)} was found.` + | ||
(didYouMean && ` ${didYouMean}`) + | ||
'\n This is probably a typing mistake. Fixing it will remove this message.'; | ||
const message = ` Unknown option ${_chalk().default.bold( | ||
`"${path && path.length > 0 ? `${path.join('.')}.` : ''}${option}"` | ||
)} with value ${_chalk().default.bold( | ||
(0, _utils.format)(config[option]) | ||
)} was found.${ | ||
didYouMean && ` ${didYouMean}` | ||
}\n This is probably a typing mistake. Fixing it will remove this message.`; | ||
const comment = options.comment; | ||
@@ -45,0 +44,0 @@ const name = (options.title && options.title.warning) || _utils.WARNING; |
{ | ||
"name": "jest-validate", | ||
"version": "28.0.0-alpha.5", | ||
"version": "28.0.0-alpha.6", | ||
"repository": { | ||
@@ -20,3 +20,3 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/types": "^28.0.0-alpha.5", | ||
"@jest/types": "^28.0.0-alpha.6", | ||
"camelcase": "^6.2.0", | ||
@@ -26,3 +26,3 @@ "chalk": "^4.0.0", | ||
"leven": "^3.1.0", | ||
"pretty-format": "^28.0.0-alpha.5" | ||
"pretty-format": "^28.0.0-alpha.6" | ||
}, | ||
@@ -38,3 +38,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "46fb19b2628bd87676c10730ba19592c30b05478" | ||
"gitHead": "6284ada4adb7008f5f8673b1a7b1c789d2e508fb" | ||
} |
27975
691
Updated@jest/types@^28.0.0-alpha.6