Since we want the user to be able to pass a negative comparison function, the extra layer of wrapping is now needed
17 lines
358 B
JavaScript
17 lines
358 B
JavaScript
getJasmineRequireObj().toContain = function() {
|
|
function toContain(util, customEqualityTesters) {
|
|
customEqualityTesters = customEqualityTesters || [];
|
|
|
|
return {
|
|
compare: function(actual, expected) {
|
|
|
|
return {
|
|
pass: util.contains(actual, expected, customEqualityTesters)
|
|
};
|
|
}
|
|
};
|
|
}
|
|
|
|
return toContain;
|
|
};
|