Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-matcher-utils

Package Overview
Dependencies
Maintainers
3
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-matcher-utils - npm Package Compare versions

Comparing version 19.0.0 to 19.1.0-alpha.eed82034

yarn.lock

57

build/index.js

@@ -16,4 +16,7 @@ /**

const AsymmetricMatcherPlugin = require('pretty-format/build/plugins/AsymmetricMatcher');
const ReactElementPlugin = require('pretty-format/build/plugins/ReactElement');
const ImmutablePlugins = require('pretty-format/build/plugins/ImmutablePlugins');
const PLUGINS = [AsymmetricMatcherPlugin];
const PLUGINS = [AsymmetricMatcherPlugin, ReactElementPlugin].concat(
ImmutablePlugins);

@@ -34,2 +37,3 @@

const EXPECTED_COLOR = chalk.green;

@@ -118,11 +122,7 @@ const EXPECTED_BG = chalk.bgGreen;

const printReceived = object => highlightTrailingWhitespace(
RECEIVED_COLOR(stringify(object)),
RECEIVED_BG);
const printReceived = object =>
highlightTrailingWhitespace(RECEIVED_COLOR(stringify(object)), RECEIVED_BG);
const printExpected = value =>
highlightTrailingWhitespace(EXPECTED_COLOR(stringify(value)), EXPECTED_BG);
const printExpected = value => highlightTrailingWhitespace(
EXPECTED_COLOR(stringify(value)),
EXPECTED_BG);
const printWithType = (

@@ -134,9 +134,6 @@ name,

const type = getType(received);
return (
name + ':' + (
type !== 'null' && type !== 'undefined' ?
'\n ' + type + ': ' :
' ') +
print(received));
return name +
':' + (
type !== 'null' && type !== 'undefined' ? '\n ' + type + ': ' : ' ') +
print(received);
};

@@ -148,3 +145,4 @@

throw new Error(
matcherHint('[.not]' + matcherName, undefined, '') + '\n\n' +
matcherHint('[.not]' + matcherName, undefined, '') +
'\n\n' +
'Matcher does not accept any arguments.\n' +

@@ -160,4 +158,5 @@ printWithType('Got', expected, printExpected));

throw new Error(
matcherHint('[.not]' + matcherName) + '\n\n' +
`Actual value must be a number.\n` +
matcherHint('[.not]' + matcherName) +
'\n\n' +
`Received value must be a number.\n` +
printWithType('Received', actual, printReceived));

@@ -172,3 +171,4 @@

throw new Error(
matcherHint('[.not]' + matcherName) + '\n\n' +
matcherHint('[.not]' + matcherName) +
'\n\n' +
`Expected value must be a number.\n` +

@@ -185,4 +185,3 @@ printWithType('Got', expected, printExpected));

const pluralize =
(word, count) =>
const pluralize = (word, count) =>
(NUMBERS[count] || count) + ' ' + word + (count === 1 ? '' : 's');

@@ -201,10 +200,8 @@

const isDirectExpectCall = options && options.isDirectExpectCall;
return (
chalk.dim('expect' + (isDirectExpectCall ? '' : '(')) +
RECEIVED_COLOR(received) +
chalk.dim((isDirectExpectCall ? '' : ')') + matcherName + '(') +
EXPECTED_COLOR(expected) + (
secondArgument ? `, ${EXPECTED_COLOR(secondArgument)}` : '') +
chalk.dim(')'));
return chalk.dim('expect' + (isDirectExpectCall ? '' : '(')) +
RECEIVED_COLOR(received) +
chalk.dim((isDirectExpectCall ? '' : ')') + matcherName + '(') +
EXPECTED_COLOR(expected) + (
secondArgument ? `, ${EXPECTED_COLOR(secondArgument)}` : '') +
chalk.dim(')');
};

@@ -211,0 +208,0 @@

{
"name": "jest-matcher-utils",
"description": "A set of utility functions for jest-matchers and related packages",
"version": "19.0.0",
"version": "19.1.0-alpha.eed82034",
"repository": {

@@ -13,4 +13,4 @@ "type": "git",

"chalk": "^1.1.3",
"pretty-format": "^19.0.0"
"pretty-format": "^19.1.0-alpha.eed82034"
}
}
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