@angular/core/testing
Entry point exports
Classes
ComponentFixture |
Fixture for debugging and testing a component. |
InjectSetupWrapper |
|
TestComponentRenderer |
An abstract class for inserting the root test component element in a platform independent way. |
Functions
async |
Wraps a test function in an asynchronous test zone. The test will automatically
complete when all asynchronous calls within this zone are done. Can be used
to wrap an |
discardPeriodicTasks |
Discard all remaining periodic tasks. |
fakeAsync |
Wraps a function to be executed in the fakeAsync zone:
|
flush |
Simulates the asynchronous passage of time for the timers in the fakeAsync zone by draining the macrotask queue until it is empty. The returned value is the milliseconds of time that would have been elapsed. |
flushMicrotasks |
Flush any pending microtasks. |
inject |
Allows injecting dependencies in |
resetFakeAsyncZone |
Clears out the shared fake async zone for a test.
To be called in a global |
tick |
Simulates the asynchronous passage of time for the timers in the fakeAsync zone. |
withModule |
Structures
TestBed |
Configures and initializes environment for unit testing and provides methods for creating components and services in unit tests. |
TestBedStatic |
Static methods implemented by the |
Types
ComponentFixtureAutoDetect |
|
ComponentFixtureNoNgZone |
|
MetadataOverride |
Type used for modifications to metadata |
TestModuleMetadata |
|
getTestBed |
Returns a singleton of the applicable |