Skip to content

Commit

Permalink
fix: make createSpyObject public (#316) (#317)
Browse files Browse the repository at this point in the history
Co-authored-by: Dominik Kremer <dominik.kremer@yatta.de>
  • Loading branch information
kremerd and Dominik Kremer committed Jun 11, 2020
1 parent 979b807 commit bb128df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/spectator/jest/src/lib/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { installProtoMethods, CompatibleSpy, SpyObject as BaseSpyObject } from '
export type SpyObject<T> = BaseSpyObject<T> & { [P in keyof T]: T[P] & (T[P] extends (...args: any[]) => infer R ? jest.Mock<R> : T[P]) };

/**
* @internal
* @publicApi
*/
export function createSpyObject<T>(type: Type<T> | AbstractType<T>, template?: Partial<Record<keyof T, any>>): SpyObject<T> {
const mock: any = { ...template } || {};
Expand Down

0 comments on commit bb128df

Please sign in to comment.