@angular/core/testing
Provides infrastructure for testing Angular core functionality.
Entry point exports
Classes
ComponentFixture |
Fixture for debugging and testing a component. |
DeferBlockFixture |
Represents an individual defer block for testing purposes. |
InjectSetupWrapper |
|
TestBed |
Configures and initializes environment for unit testing and provides methods for creating components and services in unit tests. |
TestComponentRenderer |
An abstract class for inserting the root test component element in a platform independent way. |
Functions
async |
Deprecated: use |
discardPeriodicTasks |
Discard all remaining periodic tasks. |
fakeAsync |
Wraps a function to be executed in the
|
flush |
Flushes any pending microtasks and simulates the asynchronous passage of time for the timers in
the |
flushMicrotasks |
Flush any pending microtasks. |
getTestBed |
Returns a singleton of the |
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 |
waitForAsync |
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 |
withModule |
Structures
DeferBlockBehavior |
Options for configuring defer blocks behavior. |
DeferBlockState |
Describes the current state of this defer block instance. |
ModuleTeardownOptions |
Configures the test module teardown behavior in |
TestBedStatic |
Static methods implemented by the |
TestEnvironmentOptions |
|
TestModuleMetadata |
Types
ComponentFixtureAutoDetect |
|
ComponentFixtureNoNgZone |
|
MetadataOverride |
Type used for modifications to metadata |