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

@jest/expect-utils

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jest/expect-utils - npm Package Compare versions

Comparing version 30.0.0-alpha.2 to 30.0.0-alpha.3

17

build/index.js

@@ -173,4 +173,4 @@ /*!

};
for (let i = 0; i < customTesters.length; i++) {
const customTesterResult = customTesters[i].call(testerContext, a, b, customTesters);
for (const item of customTesters) {
const customTesterResult = item.call(testerContext, a, b, customTesters);
if (customTesterResult !== undefined) {

@@ -297,3 +297,3 @@ return customTesterResult;

}
return keys.concat(Object.getOwnPropertySymbols(obj).filter(symbol => Object.getOwnPropertyDescriptor(obj, symbol).enumerable));
return [...keys, ...Object.getOwnPropertySymbols(obj).filter(symbol => Object.getOwnPropertyDescriptor(obj, symbol).enumerable)];
}

@@ -531,6 +531,7 @@ function hasKey(obj, key) {

if (!isObject(obj)) return [];
return Object.getOwnPropertySymbols(obj).filter(key => key !== Symbol.iterator).map(key => [key, obj[key]]).concat(Object.entries(obj));
const symbolProperties = Object.getOwnPropertySymbols(obj).filter(key => key !== Symbol.iterator).map(key => [key, obj[key]]);
return [...symbolProperties, ...Object.entries(obj)];
};
const isObject = a => a !== null && typeof a === 'object';
const isObjectWithKeys = a => isObject(a) && !(a instanceof Error) && !(a instanceof Array) && !(a instanceof Date);
const isObjectWithKeys = a => isObject(a) && !(a instanceof Error) && !Array.isArray(a) && !(a instanceof Date);
const subsetEquality = (object, subset, customTesters = []) => {

@@ -630,3 +631,3 @@ const filteredCustomTesters = customTesters.filter(t => t !== subsetEquality);

// will match everything that's not a dot or a bracket, and "" for consecutive dots.
const pattern = RegExp('[^.[\\]]+|(?=(?:\\.)(?:\\.|$))', 'g');
const pattern = new RegExp('[^.[\\]]+|(?=(?:\\.)(?:\\.|$))', 'g');

@@ -637,3 +638,3 @@ // Because the regex won't match a dot in the beginning of the path, if present.

}
propertyPath.replace(pattern, match => {
propertyPath.replaceAll(pattern, match => {
properties.push(match);

@@ -661,3 +662,3 @@ return match;

}
const MULTILINE_REGEXP = /[\r\n]/;
const MULTILINE_REGEXP = /[\n\r]/;
const isOneline = (expected, received) => typeof expected === 'string' && typeof received === 'string' && (!MULTILINE_REGEXP.test(expected) || !MULTILINE_REGEXP.test(received));

@@ -664,0 +665,0 @@ exports.isOneline = isOneline;

{
"name": "@jest/expect-utils",
"version": "30.0.0-alpha.2",
"version": "30.0.0-alpha.3",
"repository": {

@@ -22,9 +22,7 @@ "type": "git",

"dependencies": {
"jest-get-type": "30.0.0-alpha.2"
"jest-get-type": "30.0.0-alpha.3"
},
"devDependencies": {
"@tsd/typescript": "^5.0.4",
"immutable": "^4.0.0",
"jest-matcher-utils": "30.0.0-alpha.2",
"tsd-lite": "^0.8.0"
"jest-matcher-utils": "30.0.0-alpha.3"
},

@@ -37,3 +35,3 @@ "engines": {

},
"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