TestBed
platform
PlatformRefngModule
Type<any> | Type<any>[]initTestEnvironment
voidInitialize the environment for testing with a compiler factory, a PlatformRef, and an angular module. These are common to every test in the suite.
This may only be called once, to set up the common providers for the current test
suite on the current platform. If you absolutely need to change the providers,
first use resetTestEnvironment.
Test modules and platforms for individual platforms are available from
'@angular/
Type<any> | Type<any>[]PlatformRefvoidresetTestEnvironment
voidReset the providers for the test injector.
voidconfigureCompiler
void{ providers?: any[] | undefined; useJit?: boolean | undefined; }voidcompileComponents
Promise<any>Promise<any>inject
TProviderToken<T>undefinedInjectOptions & { optional?: false | undefined; }Tinject
T | nullProviderToken<T>null | undefinedInjectOptionsT | nullinject
TProviderToken<T>T | undefinedInjectOptions | undefinedTrunInInjectionContext
Texecute
anyany[]FunctionanyanyoverrideModule
TestBedoverrideComponent
TestBedoverrideDirective
TestBedoverridePipe
TestBedoverrideProvider
TestBedOverwrites all providers for the given token with the given provider definition.
any{ useFactory: Function; deps: any[]; multi?: boolean | undefined; }TestBedoverrideProvider
TestBedoverrideProvider
TestBedany{ useFactory?: Function | undefined; useValue?: any; deps?: any[] | undefined; multi?: boolean | undefined; }TestBedoverrideTemplateUsingTestingModule
TestBedcreateComponent
ComponentFixture<T>flushEffects
voidExecute any pending effects.
voidtick
voidExecute any pending work required to synchronize model to the UI.
voidplatform
PlatformRefngModule
Type<any> | Type<any>[]initTestEnvironment
voidInitialize the environment for testing with a compiler factory, a PlatformRef, and an angular module. These are common to every test in the suite.
This may only be called once, to set up the common providers for the current test
suite on the current platform. If you absolutely need to change the providers,
first use resetTestEnvironment.
Test modules and platforms for individual platforms are available from
'@angular/
Type<any> | Type<any>[]PlatformRefvoidresetTestEnvironment
voidReset the providers for the test injector.
voidconfigureCompiler
void{ providers?: any[] | undefined; useJit?: boolean | undefined; }voidcompileComponents
Promise<any>Promise<any>inject
TProviderToken<T>undefinedInjectOptions & { optional?: false | undefined; }Tinject
T | nullProviderToken<T>null | undefinedInjectOptionsT | nullinject
TProviderToken<T>T | undefinedInjectOptions | undefinedTrunInInjectionContext
Texecute
anyany[]FunctionanyanyoverrideModule
TestBedoverrideComponent
TestBedoverrideDirective
TestBedoverridePipe
TestBedoverrideProvider
TestBedOverwrites all providers for the given token with the given provider definition.
any{ useFactory: Function; deps: any[]; multi?: boolean | undefined; }TestBedoverrideProvider
TestBedoverrideProvider
TestBedany{ useFactory?: Function | undefined; useValue?: any; deps?: any[] | undefined; multi?: boolean | undefined; }TestBedoverrideTemplateUsingTestingModule
TestBedcreateComponent
ComponentFixture<T>flushEffects
voidExecute any pending effects.
voidtick
voidExecute any pending work required to synchronize model to the UI.
void