@testing-library/angular
Version:
Test your Angular components with the dom-testing-library
9 lines (8 loc) • 499 B
TypeScript
import { Type, Provider } from '@angular/core';
export type Mock<T> = T & {
[K in keyof T]: T[K] & jest.Mock;
};
export declare function createMock<T>(type: Type<T>): Mock<T>;
export declare function createMockWithValues<T, K extends keyof T>(type: Type<T>, values: Partial<Record<K, T[K]>>): Mock<T>;
export declare function provideMock<T>(type: Type<T>): Provider;
export declare function provideMockWithValues<T, K extends keyof T>(type: Type<T>, values: Partial<Record<K, T[K]>>): Provider;