diff --git a/test/utils.ts b/test/utils.ts index b9de7f393..62343a3fc 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -49,6 +49,10 @@ export function createApiCall(func, opts?) { if (opts.returnCancelFunc) { return { cancel: func(argument, metadata, options, callback), + completed: true, + call: () => { + throw new Error('should not be run'); + } }; } func(argument, metadata, options, callback); @@ -56,6 +60,10 @@ export function createApiCall(func, opts?) { cancel: opts.cancel || (() => { callback(new Error('canceled')); }), + completed: true, + call: () => { + throw new Error('should not be run'); + } }; }), settings, descriptor);