Merge branch 'FelixRilling-boolean-matcher'
- Merges #1679 from @FelixRilling
This commit is contained in:
@@ -109,6 +109,7 @@ getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
||||
'toBe',
|
||||
'toBeCloseTo',
|
||||
'toBeDefined',
|
||||
'toBeFalse',
|
||||
'toBeFalsy',
|
||||
'toBeGreaterThan',
|
||||
'toBeGreaterThanOrEqual',
|
||||
@@ -118,6 +119,7 @@ getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
||||
'toBeNegativeInfinity',
|
||||
'toBeNull',
|
||||
'toBePositiveInfinity',
|
||||
'toBeTrue',
|
||||
'toBeTruthy',
|
||||
'toBeUndefined',
|
||||
'toContain',
|
||||
@@ -4098,6 +4100,27 @@ getJasmineRequireObj().toBeDefined = function() {
|
||||
return toBeDefined;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
getJasmineRequireObj().toBeFalsy = function() {
|
||||
/**
|
||||
* {@link expect} the actual value to be falsy
|
||||
@@ -4318,6 +4341,27 @@ getJasmineRequireObj().toBePositiveInfinity = function(j$) {
|
||||
return toBePositiveInfinity;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
getJasmineRequireObj().toBeTruthy = function() {
|
||||
/**
|
||||
* {@link expect} the actual value to be truthy.
|
||||
|
||||
Reference in New Issue
Block a user