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:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user