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().toBeFalse = function() {
/**
* {@link expect} the actual value to be `false`.
* @function
* @name matchers#toBeFalse
* @example
* expect(result).toBeFalse();
*/
function toBeFalse() {
return {
compare: function(actual) {
return {
pass: actual === false
};
}
};
}
return toBeFalse;
};