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 | any | token of application, root element |
testability | Testability | Testability hook |
unregisterApplication() | |||
---|---|---|---|
Unregisters an application. | |||
|
token | any | token of application, root element |
unregisterAllApplications() |
---|
Unregisters all applications |
|
getTestability() | |||
---|---|---|---|
Get a testability hook associated with the application | |||
|
elem | any | 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 | node |
findInAncestors | boolean | whether finding testability in ancestors if testability was not found in current node Optional. Default is |
Returns
Testability | null
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v10.angular.io/api/core/TestabilityRegistry