Since we want the user to be able to pass a negative comparison function, the extra layer of wrapping is now needed
15 lines
220 B
JavaScript
15 lines
220 B
JavaScript
getJasmineRequireObj().toBeTruthy = function() {
|
|
|
|
function toBeTruthy() {
|
|
return {
|
|
compare: function(actual) {
|
|
return {
|
|
pass: !!actual
|
|
};
|
|
}
|
|
};
|
|
}
|
|
|
|
return toBeTruthy;
|
|
};
|