added #toBeTrue and #toBeFalse matchers
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
getJasmineRequireObj().toBeTrue = function() {
|
||||
/**
|
||||
* {@link expect} the actual value to be `true`.
|
||||
* @function
|
||||
* @name matchers#toBeTrue
|
||||
* @example
|
||||
* expect(result).toBeTrue();
|
||||
*/
|
||||
function toBeTrue() {
|
||||
return {
|
||||
compare: function(actual) {
|
||||
return {
|
||||
pass: actual === true
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return toBeTrue;
|
||||
};
|
||||
Reference in New Issue
Block a user