UNPKG

@orchestrator/ngx-testing

Version:
14 lines (13 loc) 854 B
import { Type } from '@angular/core'; import { Host } from './host'; import { HostComponentService } from './host-component.service'; import { HostDirectiveService } from './host-directive.service'; import { NgxTestingModule } from './ngx-testing.module'; import { ComponentInputs, TestingComponentModuleExtras, TestingDirectiveModuleExtras } from './types'; export interface TestingFactory<T, H extends Host> { testModule: NgxTestingModule<T>; getHost(): H; createComponent(inputs?: ComponentInputs<T>, detectChanges?: boolean): Promise<H>; } export declare function getTestingForComponent<T>(type: Type<T>, extras?: TestingComponentModuleExtras): TestingFactory<T, HostComponentService<T>>; export declare function getTestingForDirective<T>(type: Type<T>, extras?: TestingDirectiveModuleExtras): TestingFactory<T, HostDirectiveService<T>>;