#1015 use isNumber fuction to check for empty expected argument. This will allow 0 to be passed in.

This commit is contained in:
Kevin Logan
2016-02-17 12:03:06 -06:00
parent 4fb5aa14b8
commit e5c744f3dc
2 changed files with 102 additions and 66 deletions

View File

@@ -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;
};
};