jest-matcher-utils
Advanced tools
Comparing version 29.2.1 to 29.2.2
@@ -120,2 +120,12 @@ /** | ||
export declare function replaceMatchedToAsymmetricMatcher( | ||
replacedExpected: unknown, | ||
replacedReceived: unknown, | ||
expectedCycles: Array<unknown>, | ||
receivedCycles: Array<unknown>, | ||
): { | ||
replacedExpected: unknown; | ||
replacedReceived: unknown; | ||
}; | ||
export declare const stringify: ( | ||
@@ -122,0 +132,0 @@ object: unknown, |
@@ -28,2 +28,3 @@ 'use strict'; | ||
exports.printWithType = printWithType; | ||
exports.replaceMatchedToAsymmetricMatcher = replaceMatchedToAsymmetricMatcher; | ||
exports.stringify = void 0; | ||
@@ -338,8 +339,3 @@ var _chalk = _interopRequireDefault(require('chalk')); | ||
const {replacedExpected, replacedReceived} = | ||
replaceMatchedToAsymmetricMatcher( | ||
(0, _deepCyclicCopyReplaceable.default)(expected), | ||
(0, _deepCyclicCopyReplaceable.default)(received), | ||
[], | ||
[] | ||
); | ||
replaceMatchedToAsymmetricMatcher(expected, received, [], []); | ||
const difference = (0, _jestDiff.diff)(replacedExpected, replacedReceived, { | ||
@@ -391,2 +387,15 @@ aAnnotation: expectedLabel, | ||
) { | ||
return _replaceMatchedToAsymmetricMatcher( | ||
(0, _deepCyclicCopyReplaceable.default)(replacedExpected), | ||
(0, _deepCyclicCopyReplaceable.default)(replacedReceived), | ||
expectedCycles, | ||
receivedCycles | ||
); | ||
} | ||
function _replaceMatchedToAsymmetricMatcher( | ||
replacedExpected, | ||
replacedReceived, | ||
expectedCycles, | ||
receivedCycles | ||
) { | ||
if (!_Replaceable.default.isReplaceable(replacedExpected, replacedReceived)) { | ||
@@ -424,3 +433,3 @@ return { | ||
) { | ||
const replaced = replaceMatchedToAsymmetricMatcher( | ||
const replaced = _replaceMatchedToAsymmetricMatcher( | ||
expectedValue, | ||
@@ -427,0 +436,0 @@ receivedValue, |
{ | ||
"name": "jest-matcher-utils", | ||
"description": "A set of utility functions for expect and related packages", | ||
"version": "29.2.1", | ||
"version": "29.2.2", | ||
"repository": { | ||
@@ -36,3 +36,3 @@ "type": "git", | ||
}, | ||
"gitHead": "4551c0fdd4d25b7206824957c7bcc6baf61e63bf" | ||
"gitHead": "0a8edbe0ac434394a16cc173a03ff54a9cc50e41" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28225
796