@@ -168,7 +168,13 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
|
||||
* @param {Function} fn The function to invoke with the passed parameters.
|
||||
*/
|
||||
SpyStrategy.prototype.callFake = function(fn) {
|
||||
if (!(j$.isFunction_(fn) || j$.isAsyncFunction_(fn))) {
|
||||
if (
|
||||
!(
|
||||
j$.isFunction_(fn) ||
|
||||
j$.isAsyncFunction_(fn) ||
|
||||
j$.isGeneratorFunction_(fn)
|
||||
)
|
||||
) {
|
||||
throw new Error(
|
||||
'Argument passed to callFake should be a function, got ' + fn
|
||||
);
|
||||
|
||||
@@ -76,6 +76,10 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
||||
return j$.isA_('AsyncFunction', value);
|
||||
};
|
||||
|
||||
j$.isGeneratorFunction_ = function(value) {
|
||||
return j$.isA_('GeneratorFunction', value);
|
||||
};
|
||||
|
||||
j$.isTypedArray_ = function(value) {
|
||||
return (
|
||||
j$.isA_('Float32Array', value) ||
|
||||
|
||||
Reference in New Issue
Block a user