Socket
Socket
Sign inDemoInstall

@jest/expect-utils

Package Overview
Dependencies
1
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

5

build/index.d.ts

@@ -7,2 +7,3 @@ /**

*/
export declare const arrayBufferEquality: (

@@ -64,5 +65,5 @@ a: unknown,

export declare const partition: <T>(
items: T[],
items: Array<T>,
predicate: (arg: T) => boolean,
) => [T[], T[]];
) => [Array<T>, Array<T>];

@@ -69,0 +70,0 @@ export declare const pathAsArray: (propertyPath: string) => Array<any>;

21

build/index.js

@@ -215,2 +215,5 @@ /*!

return a.source === b.source && a.flags === b.flags;
// URLs are compared by their href property which contains the entire url string.
case '[object URL]':
return a.href === b.href;
}

@@ -342,6 +345,8 @@ if (typeof a !== 'object' || typeof b !== 'object') {

// Retrieves an object's keys for evaluation by getObjectSubset. This evaluates
// the prototype chain for string keys but not for symbols. (Otherwise, it
// could find values such as a Set or Map's Symbol.toStringTag, with unexpected
// results.)
const getObjectKeys = object => [...Object.keys(object), ...Object.getOwnPropertySymbols(object)];
// the prototype chain for string keys but not for non-enumerable symbols.
// (Otherwise, it could find values such as a Set or Map's Symbol.toStringTag,
// with unexpected results.)
const getObjectKeys = object => {
return [...Object.keys(object), ...Object.getOwnPropertySymbols(object).filter(s => Object.getOwnPropertyDescriptor(object, s)?.enumerable)];
};
exports.getObjectKeys = getObjectKeys;

@@ -511,4 +516,4 @@ const getPath = (object, propertyPath) => {

if (!(0, _immutableUtils.isImmutableList)(a) && !(0, _immutableUtils.isImmutableOrderedKeyed)(a) && !(0, _immutableUtils.isImmutableOrderedSet)(a) && !(0, _immutableUtils.isImmutableRecord)(a)) {
const aEntries = Object.entries(a);
const bEntries = Object.entries(b);
const aEntries = entries(a);
const bEntries = entries(b);
if (!(0, _jasmineUtils.equals)(aEntries, bEntries)) {

@@ -525,2 +530,6 @@ return false;

exports.iterableEquality = iterableEquality;
const entries = obj => {
if (!isObject(obj)) return [];
return Object.getOwnPropertySymbols(obj).filter(key => key !== Symbol.iterator).map(key => [key, obj[key]]).concat(Object.entries(obj));
};
const isObject = a => a !== null && typeof a === 'object';

@@ -527,0 +536,0 @@ const isObjectWithKeys = a => isObject(a) && !(a instanceof Error) && !(a instanceof Array) && !(a instanceof Date);

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

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

"dependencies": {
"jest-get-type": "30.0.0-alpha.1"
"jest-get-type": "30.0.0-alpha.2"
},

@@ -28,3 +28,3 @@ "devDependencies": {

"immutable": "^4.0.0",
"jest-matcher-utils": "30.0.0-alpha.1",
"jest-matcher-utils": "30.0.0-alpha.2",
"tsd-lite": "^0.8.0"

@@ -38,3 +38,3 @@ },

},
"gitHead": "d005cb2505c041583e0c5636d006e08666a54b63"
"gitHead": "c04d13d7abd22e47b0997f6027886aed225c9ce4"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc