Allowed async functions to be passed into spy#callFake
This commit is contained in:
@@ -88,7 +88,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
|
||||
* @param {Function} fn The function to invoke with the passed parameters.
|
||||
*/
|
||||
this.callFake = function(fn) {
|
||||
if(!j$.isFunction_(fn)) {
|
||||
if(!(j$.isFunction_(fn) || j$.isAsyncFunction_(fn))) {
|
||||
throw new Error('Argument passed to callFake should be a function, got ' + fn);
|
||||
}
|
||||
plan = fn;
|
||||
|
||||
Reference in New Issue
Block a user