TestabilityRegistry
class
A global registry of Testability
instances for specific elements.
class TestabilityRegistry { registerApplication(token: any, testability: Testability) unregisterApplication(token: any) unregisterAllApplications() getTestability(elem: any): Testability | null getAllTestabilities(): Testability[] getAllRootElements(): any[] findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability | null }
Methods
registerApplication() | ||||
---|---|---|---|---|
Registers an application with a testability hook so that it can be tracked | ||||
|
token | token of application, root element |
testability | Testability hook |
unregisterApplication() | ||
---|---|---|
Unregisters an application. | ||
|
token | token of application, root element |
unregisterAllApplications() |
---|
Unregisters all applications |
|
getTestability() | ||
---|---|---|
Get a testability hook associated with the application | ||
|
elem | root element |
Returns
Testability | null
getAllTestabilities() |
---|
Get all registered testabilities |
|
getAllRootElements() |
---|
Get all registered applications(root elements) |
|
findTestabilityInTree() | ||||
---|---|---|---|---|
Find testability of a node in the Tree | ||||
|
elem | node |
findInAncestors | whether finding testability in ancestors if testability was not found in current node Optional. Default is |
Returns
Testability | null
© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v6.angular.io/api/core/TestabilityRegistry