TestBedStatic
interface
stable
Static methods implemented by the 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/
@paramngModule
Type<any> | Type<any>[]@paramplatform
PlatformRef@returns
voidresetTestEnvironment
voidReset the providers for the test injector.
@returns
voidconfigureCompiler
void@paramconfig
{ providers?: any[] | undefined; useJit?: boolean | undefined; }@returns
voidcompileComponents
Promise<any>@returns
Promise<any>inject
T@paramtoken
ProviderToken<T>@paramnotFoundValue
undefined@paramoptions
InjectOptions & { optional?: false | undefined; }@returns
Tinject
T | null@paramtoken
ProviderToken<T>@paramnotFoundValue
null | undefined@paramoptions
InjectOptions@returns
T | nullinject
T@paramtoken
ProviderToken<T>@paramnotFoundValue
T | undefined@paramoptions
InjectOptions | undefined@returns
TrunInInjectionContext
Texecute
any@paramtokens
any[]@paramfn
Function@paramcontext
any@returns
anyoverrideModule
TestBedoverrideComponent
TestBedoverrideDirective
TestBedoverridePipe
TestBedoverrideProvider
TestBedOverwrites all providers for the given token with the given provider definition.
@paramtoken
any@paramprovider
{ useFactory: Function; deps: any[]; multi?: boolean | undefined; }@returns
TestBedoverrideProvider
TestBedoverrideProvider
TestBed@paramtoken
any@paramprovider
{ useFactory?: Function | undefined; useValue?: any; deps?: any[] | undefined; multi?: boolean | undefined; }@returns
TestBedoverrideTemplateUsingTestingModule
TestBedcreateComponent
ComponentFixture<T>@paramcomponent
Type<T>@returns
ComponentFixture<T>flushEffects
voidExecute any pending effects.
@returns
voidtick
voidExecute any pending work required to synchronize model to the UI.
@returns
voidJump to details