#1015 use isNumber fuction to check for empty expected argument. This will allow 0 to be passed in.
This commit is contained in:
@@ -10,8 +10,8 @@ getJasmineRequireObj().toHaveBeenCalledTimes = function(j$) {
|
||||
var args = Array.prototype.slice.call(arguments, 0),
|
||||
result = { pass: false };
|
||||
|
||||
if(!expected){
|
||||
throw new Error('Expected times failed is required as an argument.');
|
||||
if (!j$.isNumber_(expected)){
|
||||
throw new Error('The expected times failed is a required argument and must be a number.');
|
||||
}
|
||||
|
||||
actual = args[0];
|
||||
@@ -27,4 +27,4 @@ getJasmineRequireObj().toHaveBeenCalledTimes = function(j$) {
|
||||
}
|
||||
|
||||
return toHaveBeenCalledTimes;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user