Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (actualObj instanceof RegExp && expectationObj instanceof RegExp) {
if (valueToString(actualObj) !== valueToString(expectationObj)) {
return false;
}
}
if (actualObj instanceof Error && expectationObj instanceof Error) {
return actualObj === expectationObj;
}
var actualClass = getClass(actualObj);
var expectationClass = getClass(expectationObj);
var actualKeys = keys(actualObj);
var expectationKeys = keys(expectationObj);
var actualName = className(actualObj);
var expectationName = className(expectationObj);
var expectationSymbols =
typeof getOwnPropertySymbols === "function"
? getOwnPropertySymbols(expectationObj)
: [];
var expectationKeysAndSymbols = expectationKeys.concat(
expectationSymbols
);
if (isArguments(actualObj) || isArguments(expectationObj)) {
if (actualObj.length !== expectationObj.length) {
return false;
}
} else {
if (
actualType !== expectationType ||
actualClass !== expectationClass ||
if (actualObj instanceof RegExp && expectationObj instanceof RegExp) {
if (valueToString(actualObj) !== valueToString(expectationObj)) {
return false;
}
}
if (actualObj instanceof Error && expectationObj instanceof Error) {
return actualObj === expectationObj;
}
var actualClass = getClass(actualObj);
var expectationClass = getClass(expectationObj);
var actualKeys = keys(actualObj);
var expectationKeys = keys(expectationObj);
var actualName = className(actualObj);
var expectationName = className(expectationObj);
var expectationSymbols =
typeof getOwnPropertySymbols === "function"
? getOwnPropertySymbols(expectationObj)
: [];
var expectationKeysAndSymbols = expectationKeys.concat(
expectationSymbols
);
if (isArguments(actualObj) || isArguments(expectationObj)) {
if (actualObj.length !== expectationObj.length) {
return false;
}
} else {
if (
actualType !== expectationType ||