TestBedStatic
interface
Static methods implemented by the TestBed.
platform
PlatformRefinitTestEnvironment
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/
@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@paramnotFoundValue
undefined@returns
Tinject
T | null@paramnotFoundValue
null | undefined@returns
T | nullinject
T@paramnotFoundValue
T | undefined@returns
Tinject
T@paramnotFoundValue
T | undefined@returns
Tinject
T | null@paramnotFoundValue
null@returns
T | nullget
any@paramnotFoundValue
T | undefined@returns
anyget
any@paramtoken
any@paramnotFoundValue
any@returns
anyrunInInjectionContext
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>@returns
ComponentFixture<T>flushEffects
voidExecute any pending effects.
@returns
voidJump to details