We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b96db66 commit 4fc8e24Copy full SHA for 4fc8e24
projects/spectator/jest/src/lib/mock.ts
@@ -4,7 +4,8 @@ import { FactoryProvider, AbstractType, Type } from '@angular/core';
4
import { installProtoMethods, CompatibleSpy, SpyObject as BaseSpyObject } from '@ngneat/spectator';
5
import { jest } from '@jest/globals';
6
7
-export type SpyObject<T> = BaseSpyObject<T> & { [P in keyof T]: T[P] & (T[P] extends (...args: any[]) => infer R ? jest.Mock<R> : T[P]) };
+export type SpyObject<T> = BaseSpyObject<T> &
8
+ { [P in keyof T]: T[P] & (T[P] extends (...args: any[]) => infer R ? (R extends (...args: any[]) => any ? jest.Mock<R> : T[P]) : T[P]) };
9
10
/**
11
* @publicApi
0 commit comments