🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

jest-matcher-utils

Package Overview
Dependencies
Maintainers
4
Versions
240
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

to
30.0.0-beta.2

28

build/index.js

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

exports["default"] = void 0;
var _jestGetType = require("jest-get-type");
var _getType = require("@jest/get-type");
/**

@@ -38,3 +38,3 @@ * Copyright (c) Meta Platforms, Inc. and affiliates.

this.object = object;
this.type = (0, _jestGetType.getType)(object);
this.type = (0, _getType.getType)(object);
if (!supportTypes.has(this.type)) {

@@ -45,4 +45,4 @@ throw new Error(`Type ${this.type} is not support in Replaceable!`);

static isReplaceable(obj1, obj2) {
const obj1Type = (0, _jestGetType.getType)(obj1);
const obj2Type = (0, _jestGetType.getType)(obj2);
const obj1Type = (0, _getType.getType)(obj1);
const obj2Type = (0, _getType.getType)(obj2);
return obj1Type === obj2Type && supportTypes.has(obj1Type);

@@ -105,2 +105,5 @@ }

}
if (typeof Window !== 'undefined') {
builtInObject.push(Window);
}
const SERIALIZABLE_PROPERTIES = exports.SERIALIZABLE_PROPERTIES = Symbol.for('@jest/serializableProperties');

@@ -241,9 +244,8 @@ const isBuiltInObject = object => builtInObject.includes(object.constructor);

var _chalk = _interopRequireDefault(require("chalk"));
var _getType = require("@jest/get-type");
var _jestDiff = require("jest-diff");
var _jestGetType = require("jest-get-type");
var _prettyFormat = require("pretty-format");
var _Replaceable = _interopRequireDefault(__webpack_require__("./src/Replaceable.ts"));
var _deepCyclicCopyReplaceable = _interopRequireWildcard(__webpack_require__("./src/deepCyclicCopyReplaceable.ts"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }

@@ -257,4 +259,2 @@ /**

/* eslint-disable local/ban-types-eventually */
const {

@@ -321,3 +321,3 @@ AsymmetricMatcher,

function printWithType(name, value, print) {
const type = (0, _jestGetType.getType)(value);
const type = (0, _getType.getType)(value);
const hasType = type !== 'null' && type !== 'undefined' ? `${name} has type: ${type}\n` : '';

@@ -387,8 +387,8 @@ const hasValue = `${name} has value: ${print(value)}`;

const isLineDiffable = (expected, received) => {
const expectedType = (0, _jestGetType.getType)(expected);
const receivedType = (0, _jestGetType.getType)(received);
const expectedType = (0, _getType.getType)(expected);
const receivedType = (0, _getType.getType)(received);
if (expectedType !== receivedType) {
return false;
}
if ((0, _jestGetType.isPrimitive)(expected)) {
if ((0, _getType.isPrimitive)(expected)) {
// Print generic line diff for strings only:

@@ -514,3 +514,3 @@ // * if neither string is empty

function isAsymmetricMatcher(data) {
const type = (0, _jestGetType.getType)(data);
const type = (0, _getType.getType)(data);
return type === 'object' && typeof data.asymmetricMatch === 'function';

@@ -517,0 +517,0 @@ }

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

@@ -11,3 +11,3 @@ "type": "git",

"engines": {
"node": "^16.10.0 || ^18.12.0 || >=20.0.0"
"node": "^18.14.0 || ^20.0.0 || >=22.0.0"
},

@@ -27,9 +27,9 @@ "license": "MIT",

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

@@ -40,3 +40,3 @@ },

},
"gitHead": "bacb7de30d053cd87181294b0c8a8576632a8b02"
"gitHead": "53a5635ac9a43099033f6103e179b13a5465e017"
}