Testability
class
The Testability service provides testing hooks that can be accessed from the browser and by services such as Protractor. Each bootstrapped Angular application on the page will have an instance of Testability.
class Testability implements PublicTestability {
increasePendingRequestCount(): number
decreasePendingRequestCount(): number
isStable(): boolean
whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void
getPendingRequestCount(): number
findProviders(using: any, provider: string, exactMatch: boolean): any[]
}
Methods
increasePendingRequestCount() |
---|
Increases the number of pending request |
increasePendingRequestCount(): numberDeprecated pending requests are now tracked with zones.
ParametersThere are no parameters. Returns
|
decreasePendingRequestCount() |
---|
Decreases the number of pending request |
decreasePendingRequestCount(): numberDeprecated pending requests are now tracked with zones
ParametersThere are no parameters. Returns
|
isStable() |
---|
Whether an associated application is stable |
isStable(): booleanParametersThere are no parameters. Returns
|
whenStable() | |||||||||
---|---|---|---|---|---|---|---|---|---|
Wait for the application to be stable with a timeout. If the timeout is reached before that happens, the callback receives a list of the macro tasks that were pending, otherwise null. | |||||||||
whenStable(doneCb: Function, timeout?: number, updateCb?: Function): voidParameters
Returns
|
getPendingRequestCount() |
---|
Get the number of pending requests |
getPendingRequestCount(): numberDeprecated pending requests are now tracked with zones
ParametersThere are no parameters. Returns
|
findProviders() | |||||||||
---|---|---|---|---|---|---|---|---|---|
Find providers by name | |||||||||
findProviders(using: any, provider: string, exactMatch: boolean): any[]Parameters
Returns
|
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v10.angular.io/api/core/Testability