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

jest-matcher-utils

Package Overview
Dependencies
Maintainers
6
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 30.0.0-alpha.2 to 30.0.0-alpha.3

12

build/index.js

@@ -30,3 +30,3 @@ /*!

const supportTypes = ['map', 'array', 'object'];
const supportTypes = new Set(['map', 'array', 'object']);
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */

@@ -39,3 +39,3 @@ class Replaceable {

this.type = (0, _jestGetType.getType)(object);
if (!supportTypes.includes(this.type)) {
if (!supportTypes.has(this.type)) {
throw new Error(`Type ${this.type} is not support in Replaceable!`);

@@ -47,3 +47,3 @@ }

const obj2Type = (0, _jestGetType.getType)(obj2);
return obj1Type === obj2Type && supportTypes.includes(obj1Type);
return obj1Type === obj2Type && supportTypes.has(obj1Type);
}

@@ -277,3 +277,3 @@ forEach(cb) {

exports.stringify = stringify;
const highlightTrailingWhitespace = text => text.replace(/\s+$/gm, _chalk.default.inverse('$&'));
const highlightTrailingWhitespace = text => text.replaceAll(/\s+$/gm, _chalk.default.inverse('$&'));

@@ -283,3 +283,3 @@ // Instead of inverse highlight which now implies a change,

exports.highlightTrailingWhitespace = highlightTrailingWhitespace;
const replaceTrailingSpaces = text => text.replace(/\s+$/gm, spaces => SPACE_SYMBOL.repeat(spaces.length));
const replaceTrailingSpaces = text => text.replaceAll(/\s+$/gm, spaces => SPACE_SYMBOL.repeat(spaces.length));
const printReceived = object => RECEIVED_COLOR(replaceTrailingSpaces(stringify(object)));

@@ -296,3 +296,3 @@ exports.printReceived = printReceived;

const ensureNoExpected = (expected, matcherName, options) => {
if (typeof expected !== 'undefined') {
if (expected !== undefined) {
// Prepend maybe not only for backward compatibility.

@@ -299,0 +299,0 @@ const matcherString = (options ? '' : '[.not]') + matcherName;

{
"name": "jest-matcher-utils",
"description": "A set of utility functions for expect and related packages",
"version": "30.0.0-alpha.2",
"version": "30.0.0-alpha.3",
"repository": {

@@ -27,8 +27,8 @@ "type": "git",

"chalk": "^4.0.0",
"jest-diff": "30.0.0-alpha.2",
"jest-get-type": "30.0.0-alpha.2",
"pretty-format": "30.0.0-alpha.2"
"jest-diff": "30.0.0-alpha.3",
"jest-get-type": "30.0.0-alpha.3",
"pretty-format": "30.0.0-alpha.3"
},
"devDependencies": {
"@jest/test-utils": "30.0.0-alpha.2",
"@jest/test-utils": "30.0.0-alpha.3",
"@types/node": "*"

@@ -39,3 +39,3 @@ },

},
"gitHead": "c04d13d7abd22e47b0997f6027886aed225c9ce4"
"gitHead": "e267aff33d105399f2134bad7c8f82285104f3da"
}
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