• Overview
@angular/core

TestabilityRegistry

Class
stable

A global registry of Testability instances for specific elements.

API

    
      class TestabilityRegistry {  registerApplication(token: any, testability: Testability): void;  unregisterApplication(token: any): void;  unregisterAllApplications(): void;  getTestability(elem: any): Testability | null;  getAllTestabilities(): Testability[];  getAllRootElements(): any[];  findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;}
    
    

registerApplication

void

Registers an application with a testability hook so that it can be tracked

@paramtokenany

token of application, root element

@paramtestabilityTestability

Testability hook

@returnsvoid

unregisterApplication

void

Unregisters an application.

@paramtokenany

token of application, root element

@returnsvoid

unregisterAllApplications

void

Unregisters all applications

@returnsvoid

getTestability

Testability | null

Get a testability hook associated with the application

@paramelemany

root element

@returnsTestability | null

getAllTestabilities

Testability[]

Get all registered testabilities

@returnsTestability[]

getAllRootElements

any[]

Get all registered applications(root elements)

@returnsany[]

findTestabilityInTree

Testability | null

Find testability of a node in the Tree

@paramelemNode

node

@paramfindInAncestorsboolean

whether finding testability in ancestors if testability was not found in current node

@returnsTestability | null
Jump to details