New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-matchers

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-matchers - npm Package Compare versions

Comparing version 15.2.0-alpha.c681f819 to 16.0.0

42

build/matchers.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc