File tree Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ interface BrowserNodeGlobal {
2626 Reflect : any ;
2727 zone : Zone ;
2828 getAngularTestability : Function ;
29+ getAllAngularTestabilities : Function ;
2930 setTimeout : Function ;
3031 clearTimeout : Function ;
3132 setInterval : Function ;
Original file line number Diff line number Diff line change @@ -86,5 +86,11 @@ class GetTestability {
8686 Testability testability = registry.findTestabilityInTree (elem);
8787 return _jsify (new PublicTestability (testability));
8888 });
89+ js.context['getAllAngularTestabilities' ] = _jsify (() {
90+ List <Testability > testabilities = registry.getAllTestabilities ();
91+ List <PublicTestability > publicTestabilities =
92+ testabilities.map ((testability) => new PublicTestability (testability));
93+ return _jsify (publicTestabilities);
94+ });
8995 }
9096}
Original file line number Diff line number Diff line change @@ -23,5 +23,9 @@ export class GetTestability {
2323 }
2424 return new PublicTestability ( testability ) ;
2525 } ;
26+ global . getAllAngularTestabilities = function ( ) : List < PublicTestability > {
27+ var testabilities = registry . getAllTestabilities ( ) ;
28+ return testabilities . map ( ( testability ) => { return new PublicTestability ( testability ) ; } ) ;
29+ } ;
2630 }
2731}
Original file line number Diff line number Diff line change @@ -82,6 +82,8 @@ export class TestabilityRegistry {
8282 this . _applications . set ( token , testability ) ;
8383 }
8484
85+ getAllTestabilities ( ) : List < Testability > { return MapWrapper . values ( this . _applications ) ; }
86+
8587 findTestabilityInTree ( elem : Node ) : Testability {
8688 if ( elem == null ) {
8789 return null ;
You can’t perform that action at this time.
0 commit comments