Add toBeGreatThanOrEqual and toBeLessThanOrEqual matchers
- Implements issue #1013
This commit is contained in:
@@ -5,6 +5,8 @@ getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
||||
'toBeDefined',
|
||||
'toBeFalsy',
|
||||
'toBeGreaterThan',
|
||||
'toBeGreaterThanOrEqual',
|
||||
'toBeLessThanOrEqual',
|
||||
'toBeLessThan',
|
||||
'toBeNaN',
|
||||
'toBeNull',
|
||||
|
||||
14
src/core/matchers/toBeGreaterThanOrEqual.js
Normal file
14
src/core/matchers/toBeGreaterThanOrEqual.js
Normal file
@@ -0,0 +1,14 @@
|
||||
getJasmineRequireObj().toBeGreaterThanOrEqual = function() {
|
||||
|
||||
function toBeGreaterThanOrEqual() {
|
||||
return {
|
||||
compare: function(actual, expected) {
|
||||
return {
|
||||
pass: actual >= expected
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return toBeGreaterThanOrEqual;
|
||||
};
|
||||
14
src/core/matchers/toBeLessThanOrEqual.js
Normal file
14
src/core/matchers/toBeLessThanOrEqual.js
Normal file
@@ -0,0 +1,14 @@
|
||||
getJasmineRequireObj().toBeLessThanOrEqual = function() {
|
||||
function toBeLessThanOrEqual() {
|
||||
return {
|
||||
|
||||
compare: function(actual, expected) {
|
||||
return {
|
||||
pass: actual <= expected
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return toBeLessThanOrEqual;
|
||||
};
|
||||
Reference in New Issue
Block a user