jest-matchers
Advanced tools
Comparing version 15.2.0-alpha.c681f819 to 16.0.0
@@ -149,6 +149,6 @@ /** | ||
const message = pass ? | ||
matcherHint('.not.toBeTruthy', 'received', '') + '\n\n' + | ||
() => matcherHint('.not.toBeTruthy', 'received', '') + '\n\n' + | ||
`Expected value not to be truthy, instead received\n` + | ||
` ${ printReceived(actual) }` : | ||
matcherHint('.toBeTruthy', 'received', '') + '\n\n' + | ||
() => matcherHint('.toBeTruthy', 'received', '') + '\n\n' + | ||
`Expected value to be truthy, instead received\n` + | ||
@@ -163,6 +163,6 @@ ` ${ printReceived(actual) }`; | ||
const message = pass ? | ||
matcherHint('.not.toBeFalsy', 'received', '') + '\n\n' + | ||
() => matcherHint('.not.toBeFalsy', 'received', '') + '\n\n' + | ||
`Expected value not to be falsy, instead received\n` + | ||
` ${ printReceived(actual) }` : | ||
matcherHint('.toBeFalsy', 'received', '') + '\n\n' + | ||
() => matcherHint('.toBeFalsy', 'received', '') + '\n\n' + | ||
`Expected value to be falsy, instead received\n` + | ||
@@ -177,6 +177,6 @@ ` ${ printReceived(actual) }`; | ||
const message = pass ? | ||
matcherHint('.not.toBeNaN', 'received', '') + '\n\n' + | ||
() => matcherHint('.not.toBeNaN', 'received', '') + '\n\n' + | ||
`Expected value not to be NaN, instead received\n` + | ||
` ${ printReceived(actual) }` : | ||
matcherHint('.toBeNaN', 'received', '') + '\n\n' + | ||
() => matcherHint('.toBeNaN', 'received', '') + '\n\n' + | ||
`Expected value to be NaN, instead received\n` + | ||
@@ -191,6 +191,6 @@ ` ${ printReceived(actual) }`; | ||
const message = pass ? | ||
matcherHint('.not.toBeNull', 'received', '') + '\n\n' + | ||
() => matcherHint('.not.toBeNull', 'received', '') + '\n\n' + | ||
`Expected value not to be null, instead received\n` + | ||
` ${ printReceived(actual) }` : | ||
matcherHint('.toBeNull', 'received', '') + '\n\n' + | ||
() => matcherHint('.toBeNull', 'received', '') + '\n\n' + | ||
`Expected value to be null, instead received\n` + | ||
@@ -205,6 +205,6 @@ ` ${ printReceived(actual) }`; | ||
const message = pass ? | ||
matcherHint('.not.toBeDefined', 'received', '') + '\n\n' + | ||
() => matcherHint('.not.toBeDefined', 'received', '') + '\n\n' + | ||
`Expected value not to be defined, instead received\n` + | ||
` ${ printReceived(actual) }` : | ||
matcherHint('.toBeDefined', 'received', '') + '\n\n' + | ||
() => matcherHint('.toBeDefined', 'received', '') + '\n\n' + | ||
`Expected value to be defined, instead received\n` + | ||
@@ -219,6 +219,6 @@ ` ${ printReceived(actual) }`; | ||
const message = pass ? | ||
matcherHint('.not.toBeUndefined', 'received', '') + '\n\n' + | ||
() => matcherHint('.not.toBeUndefined', 'received', '') + '\n\n' + | ||
`Expected value not to be undefined, instead received\n` + | ||
` ${ printReceived(actual) }` : | ||
matcherHint('.toBeUndefined', 'received', '') + '\n\n' + | ||
() => matcherHint('.toBeUndefined', 'received', '') + '\n\n' + | ||
`Expected value to be undefined, instead received\n` + | ||
@@ -234,3 +234,3 @@ ` ${ printReceived(actual) }`; | ||
const message = pass ? | ||
matcherHint('.not.toBeGreaterThan') + '\n\n' + | ||
() => matcherHint('.not.toBeGreaterThan') + '\n\n' + | ||
`Expected value not to be greater than:\n` + | ||
@@ -240,3 +240,3 @@ ` ${ printExpected(expected) }\n` + | ||
` ${ printReceived(actual) }` : | ||
matcherHint('.toBeGreaterThan') + '\n\n' + | ||
() => matcherHint('.toBeGreaterThan') + '\n\n' + | ||
`Expected value to be greater than:\n` + | ||
@@ -253,3 +253,3 @@ ` ${ printExpected(expected) }\n` + | ||
const message = pass ? | ||
matcherHint('.not.toBeGreaterThanOrEqual') + '\n\n' + | ||
() => matcherHint('.not.toBeGreaterThanOrEqual') + '\n\n' + | ||
`Expected value not to be greater than or equal:\n` + | ||
@@ -259,3 +259,3 @@ ` ${ printExpected(expected) }\n` + | ||
` ${ printReceived(actual) }` : | ||
matcherHint('.toBeGreaterThanOrEqual') + '\n\n' + | ||
() => matcherHint('.toBeGreaterThanOrEqual') + '\n\n' + | ||
`Expected value to be greater than or equal:\n` + | ||
@@ -272,3 +272,3 @@ ` ${ printExpected(expected) }\n` + | ||
const message = pass ? | ||
matcherHint('.not.toBeLessThan') + '\n\n' + | ||
() => matcherHint('.not.toBeLessThan') + '\n\n' + | ||
`Expected value not to be less than:\n` + | ||
@@ -278,3 +278,3 @@ ` ${ printExpected(expected) }\n` + | ||
` ${ printReceived(actual) }` : | ||
matcherHint('.toBeLessThan') + '\n\n' + | ||
() => matcherHint('.toBeLessThan') + '\n\n' + | ||
`Expected value to be less than:\n` + | ||
@@ -291,3 +291,3 @@ ` ${ printExpected(expected) }\n` + | ||
const message = pass ? | ||
matcherHint('.not.toBeLessThanOrEqual') + '\n\n' + | ||
() => matcherHint('.not.toBeLessThanOrEqual') + '\n\n' + | ||
`Expected value not to be less than or equal:\n` + | ||
@@ -297,3 +297,3 @@ ` ${ printExpected(expected) }\n` + | ||
` ${ printReceived(actual) }` : | ||
matcherHint('.toBeLessThanOrEqual') + '\n\n' + | ||
() => matcherHint('.toBeLessThanOrEqual') + '\n\n' + | ||
`Expected value to be less than or equal:\n` + | ||
@@ -361,3 +361,3 @@ ` ${ printExpected(expected) }\n` + | ||
{let precision = arguments.length <= 2 || arguments[2] === undefined ? 2 : arguments[2]; | ||
{let precision = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2; | ||
ensureNumbers(actual, expected, '.toBeCloseTo'); | ||
@@ -364,0 +364,0 @@ const pass = Math.abs(expected - actual) < Math.pow(10, -precision) / 2; |
@@ -50,6 +50,7 @@ /** | ||
const message = pass ? | ||
matcherHint('.not' + matcherName, RECEIVED_NAME[type], '') + '\n\n' + | ||
() => matcherHint('.not' + matcherName, RECEIVED_NAME[type], '') + | ||
'\n\n' + | ||
`Expected ${ type } not to be called ` + | ||
formatReceivedCalls(calls, CALL_PRINT_LIMIT, { sameSentence: true }) : | ||
matcherHint(matcherName, RECEIVED_NAME[type], '') + '\n\n' + | ||
() => matcherHint(matcherName, RECEIVED_NAME[type], '') + '\n\n' + | ||
`Expected ${ type } to have been called.`; | ||
@@ -75,6 +76,6 @@ | ||
const message = pass ? | ||
matcherHint('.not' + matcherName, RECEIVED_NAME[type]) + '\n\n' + | ||
() => matcherHint('.not' + matcherName, RECEIVED_NAME[type]) + '\n\n' + | ||
`Expected ${ type } not to have been called with:\n` + | ||
` ${ printExpected(expected) }` : | ||
matcherHint(matcherName, RECEIVED_NAME[type]) + '\n\n' + | ||
() => matcherHint(matcherName, RECEIVED_NAME[type]) + '\n\n' + | ||
`Expected ${ type } to have been called with:\n` + | ||
@@ -102,6 +103,6 @@ ` ${ printExpected(expected) }\n` + | ||
const message = pass ? | ||
matcherHint('.not' + matcherName, RECEIVED_NAME[type]) + '\n\n' + | ||
() => matcherHint('.not' + matcherName, RECEIVED_NAME[type]) + '\n\n' + | ||
`Expected ${ type } to not have been last called with:\n` + | ||
` ${ printExpected(expected) }` : | ||
matcherHint(matcherName, RECEIVED_NAME[type]) + '\n\n' + | ||
() => matcherHint(matcherName, RECEIVED_NAME[type]) + '\n\n' + | ||
`Expected ${ type } to have been last called with:\n` + | ||
@@ -135,3 +136,3 @@ ` ${ printExpected(expected) }\n` + | ||
const message = pass ? | ||
matcherHint( | ||
() => matcherHint( | ||
'.not' + | ||
@@ -146,3 +147,3 @@ matcherName, | ||
` called exactly ${ RECEIVED_COLOR(pluralize('time', count)) }.` : | ||
matcherHint(matcherName, RECEIVED_NAME[type], String(expected)) + | ||
() => matcherHint(matcherName, RECEIVED_NAME[type], String(expected)) + | ||
'\n\n' + | ||
@@ -149,0 +150,0 @@ `Expected ${ type } to have been called ` + |
{ | ||
"name": "jest-matchers", | ||
"version": "15.2.0-alpha.c681f819", | ||
"version": "16.0.0", | ||
"repository": { | ||
@@ -11,5 +11,5 @@ "type": "git", | ||
"dependencies": { | ||
"jest-diff": "^15.2.0-alpha.c681f819", | ||
"jest-matcher-utils": "^15.2.0-alpha.c681f819", | ||
"jest-util": "^15.2.0-alpha.c681f819" | ||
"jest-diff": "^16.0.0", | ||
"jest-matcher-utils": "^16.0.0", | ||
"jest-util": "^16.0.0" | ||
}, | ||
@@ -16,0 +16,0 @@ "scripts": { |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
29046
734
1
+ Addedjest-diff@16.0.0(transitive)
+ Addedjest-file-exists@15.0.0(transitive)
+ Addedjest-matcher-utils@16.0.0(transitive)
+ Addedjest-mock@16.0.2(transitive)
+ Addedjest-util@16.0.2(transitive)
- Removedjest-diff@15.2.0-alpha.c681f819(transitive)
- Removedjest-file-exists@15.2.0-alpha.c681f819(transitive)
- Removedjest-matcher-utils@15.2.0-alpha.c681f819(transitive)
- Removedjest-mock@15.2.0-alpha.c681f819(transitive)
- Removedjest-util@15.2.0-alpha.c681f819(transitive)
Updatedjest-diff@^16.0.0
Updatedjest-matcher-utils@^16.0.0
Updatedjest-util@^16.0.0