2016-06-22 17:56:10 -04:00
|
|
|
export declare var afterEach: Function;
|
|
|
|
|
|
|
|
export declare function async(fn: Function): Function;
|
|
|
|
|
|
|
|
export declare function beforeEach(fn: Function): void;
|
|
|
|
|
|
|
|
export declare function beforeEachProviders(fn: () => Array<any>): void;
|
|
|
|
|
2016-06-24 15:41:49 -04:00
|
|
|
export declare class ComponentFixture<T> {
|
|
|
|
changeDetectorRef: ChangeDetectorRef;
|
|
|
|
componentInstance: any;
|
|
|
|
componentRef: ComponentRef<T>;
|
|
|
|
debugElement: DebugElement;
|
|
|
|
elementRef: ElementRef;
|
|
|
|
nativeElement: any;
|
|
|
|
ngZone: NgZone;
|
|
|
|
constructor(componentRef: ComponentRef<T>, ngZone: NgZone, autoDetect: boolean);
|
|
|
|
autoDetectChanges(autoDetect?: boolean): void;
|
|
|
|
checkNoChanges(): void;
|
|
|
|
destroy(): void;
|
|
|
|
detectChanges(checkNoChanges?: boolean): void;
|
|
|
|
isStable(): boolean;
|
|
|
|
whenStable(): Promise<any>;
|
|
|
|
}
|
|
|
|
|
2016-06-24 20:35:01 -04:00
|
|
|
export declare var ComponentFixtureAutoDetect: OpaqueToken;
|
|
|
|
|
|
|
|
export declare var ComponentFixtureNoNgZone: OpaqueToken;
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare var ddescribe: Function;
|
|
|
|
|
|
|
|
export declare var describe: Function;
|
|
|
|
|
|
|
|
export declare function discardPeriodicTasks(): void;
|
|
|
|
|
|
|
|
export declare var expect: Function;
|
|
|
|
|
|
|
|
export declare function fakeAsync(fn: Function): Function;
|
|
|
|
|
|
|
|
export declare var fdescribe: Function;
|
|
|
|
|
|
|
|
export declare function fit(name: string, fn: Function, timeOut?: number): void;
|
|
|
|
|
|
|
|
export declare function flushMicrotasks(): void;
|
|
|
|
|
|
|
|
export declare function getTestInjector(): TestInjector;
|
|
|
|
|
|
|
|
export declare function iit(name: string, fn: Function, timeOut?: number): void;
|
|
|
|
|
|
|
|
export declare function inject(tokens: any[], fn: Function): Function;
|
|
|
|
|
|
|
|
export declare class InjectSetupWrapper {
|
|
|
|
constructor(_providers: () => any);
|
|
|
|
inject(tokens: any[], fn: Function): Function;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare function it(name: string, fn: Function, timeOut?: number): void;
|
|
|
|
|
|
|
|
export declare function resetBaseTestProviders(): void;
|
|
|
|
|
|
|
|
export declare function setBaseTestProviders(platformProviders: Array<Type | Provider | any[]>, applicationProviders: Array<Type | Provider | any[]>): void;
|
|
|
|
|
2016-06-24 20:35:01 -04:00
|
|
|
export declare class TestComponentBuilder {
|
|
|
|
protected _injector: Injector;
|
|
|
|
constructor(_injector: Injector);
|
|
|
|
createAsync(rootComponentType: Type): Promise<ComponentFixture<any>>;
|
|
|
|
createFakeAsync(rootComponentType: Type): ComponentFixture<any>;
|
|
|
|
protected createFromFactory<C>(ngZone: NgZone, componentFactory: ComponentFactory<C>): ComponentFixture<C>;
|
|
|
|
createSync<C>(componentFactory: ComponentFactory<C>): ComponentFixture<C>;
|
|
|
|
overrideAnimations(componentType: Type, animations: AnimationEntryMetadata[]): TestComponentBuilder;
|
|
|
|
overrideDirective(componentType: Type, from: Type, to: Type): TestComponentBuilder;
|
|
|
|
overrideProviders(type: Type, providers: any[]): TestComponentBuilder;
|
|
|
|
overrideTemplate(componentType: Type, template: string): TestComponentBuilder;
|
|
|
|
overrideView(componentType: Type, view: ViewMetadata): TestComponentBuilder;
|
|
|
|
overrideViewProviders(type: Type, providers: any[]): TestComponentBuilder;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare class TestComponentRenderer {
|
|
|
|
insertRootElement(rootElementId: string): void;
|
|
|
|
}
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class TestInjector {
|
|
|
|
applicationProviders: Array<Type | Provider | any[] | any>;
|
2016-06-23 21:19:32 -04:00
|
|
|
platformProviders: Array<Type | Provider | any[] | any>;
|
2016-06-22 17:56:10 -04:00
|
|
|
addProviders(providers: Array<Type | Provider | any[] | any>): void;
|
|
|
|
createInjector(): ReflectiveInjector;
|
|
|
|
execute(tokens: any[], fn: Function): any;
|
2016-06-23 21:19:32 -04:00
|
|
|
get(token: any): any;
|
|
|
|
reset(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export declare function tick(millis?: number): void;
|
|
|
|
|
|
|
|
export declare function withProviders(providers: () => any): InjectSetupWrapper;
|
|
|
|
|
|
|
|
export declare var xdescribe: Function;
|
|
|
|
|
|
|
|
export declare function xit(name: string, fn: Function, timeOut?: number): void;
|