Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
returned: function returned(value) {
return deepEqual(this.returnValue, value);
},
return every(arr1, function(element, i) {
return deepEqual(arr2[i], element);
});
}
function(prev, arg, i) {
return prev && deepEqual(self.args[i], arg);
},
true
function matches(fake, args, strict) {
var margs = fake.matchingArguments;
if (margs.length <= args.length && deepEqual(slice(args, 0, margs.length), margs)) {
return !strict || margs.length === args.length;
}
return false;
}
return isReallyNaN(a) && isReallyNaN(b) || a === b;
}
if (a instanceof Error && b instanceof Error) {
return a === b;
}
if (toString(a) !== toString(b)) {
return false;
}
if (join(sort(Object.keys(a))) !== join(sort(Object.keys(b)))) {
return false;
}
if (samsam.deepEqual(a, b)) {
return true;
}
if (matcher) {
var keys = Object.keys(a);
var allKeysMatch = every(keys, function (key) {
return matcher(a[key], b[key]);
});
return keys.length > 0 && allKeysMatch;
}
return false;
};
assert: function(actual, expected) {
if (typeof expected === "undefined") {
return this.fail(
"Expectation for equals should not be undefined. Use assert.defined or refute.defined instead."
);
}
return samsam.deepEqual(actual, expected);
},
assertMessage:
return every(expectedArguments, function(expectedArgument, i) {
if (!verifyMatcher(expectedArgument, _args[i])) {
return false;
}
if (!deepEqual(_args[i], expectedArgument)) {
return false;
}
return true;
});
},
assert: function(actual, expected) {
var parsed;
try {
parsed = JSON.parse(actual);
} catch (e) {
return this.fail(parseErrorMessage);
}
return samsam.deepEqual(parsed, expected);
},
assertMessage: