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 14.3.0-alpha.d13c163e to 14.3.1-alpha.410cb91a

26

build/index.js

@@ -27,2 +27,5 @@ /**

const EXPECTED_COLOR = chalk.green;
const RECEIVED_COLOR = chalk.red;
// get the type of a value with handling the edge cases like `typeof []`

@@ -94,4 +97,4 @@ // and `typeof null`

const highlight = object => chalk.red(stringify(object));
const printExpected = value => chalk.green(stringify(value));
const printReceived = object => RECEIVED_COLOR(stringify(object));
const printExpected = value => EXPECTED_COLOR(stringify(value));

@@ -130,3 +133,18 @@ const ensureNoExpected = (expected, matcherName) => {

const pluralize =
(word, count) => `${ count } ${ word }${ count === 1 ? '' : 's' }`;
const matcherHint = function (
matcherName)
{let received = arguments.length <= 1 || arguments[1] === undefined ? 'received' : arguments[1];let expected = arguments.length <= 2 || arguments[2] === undefined ? 'expected' : arguments[2];
return chalk.dim('expect(') + RECEIVED_COLOR(received) +
chalk.dim(')' + matcherName + '(') +
EXPECTED_COLOR(expected) + chalk.dim(')');
};
module.exports = {
EXPECTED_COLOR,
RECEIVED_COLOR,
ensureActualIsNumber,

@@ -137,4 +155,6 @@ ensureExpectedIsNumber,

getType,
highlight,
matcherHint,
pluralize,
printExpected,
printReceived,
stringify };

2

package.json
{
"name": "jest-matcher-utils",
"description": "A set of utility functions for jest-matchers and related packages",
"version": "14.3.0-alpha.d13c163e",
"version": "14.3.1-alpha.410cb91a",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

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