Merge branch 'callfake-better-error' of https://github.com/kapke/jasmine into kapke-callfake-better-error

- Merges #1059
- Fixes #1016
This commit is contained in:
Gregg Van Hove
2016-08-15 09:34:03 -07:00
2 changed files with 17 additions and 2 deletions

View File

@@ -45,6 +45,9 @@ getJasmineRequireObj().SpyStrategy = function() {
};
this.callFake = function(fn) {
if(!(fn instanceof Function)) {
throw new Error('Argument passed to callFake should be a function, got ' + fn);
}
plan = fn;
return getSpy();
};