Merge branch 'logankd-master'

- Support call count of 0 with toHaveBeenCalledTimes matcher

- Merges #1048
- Fixes #994
This commit is contained in:
Gregg Van Hove
2016-02-17 10:29:01 -08:00
3 changed files with 13 additions and 9 deletions

View File

@@ -3138,8 +3138,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];
@@ -3156,7 +3156,6 @@ getJasmineRequireObj().toHaveBeenCalledTimes = function(j$) {
return toHaveBeenCalledTimes;
};
getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
function toHaveBeenCalledWith(util, customEqualityTesters) {