added #toBeTrue and #toBeFalse matchers

This commit is contained in:
Felix Rilling
2019-04-14 10:17:59 +02:00
parent 8fca3b4c11
commit 369e810791
5 changed files with 76 additions and 0 deletions
+20
View File
@@ -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;
};