@@ -12,7 +12,7 @@ import {
1212 IS_DARTIUM
1313} from 'angular2/test_lib' ;
1414import { isPresent , stringify } from 'angular2/src/facade/lang' ;
15- import { bootstrap } from 'angular2/src/core/application' ;
15+ import { bootstrap , ApplicationRef } from 'angular2/src/core/application' ;
1616import { Component , Directive , View } from 'angular2/annotations' ;
1717import { DOM } from 'angular2/src/dom/dom_adapter' ;
1818import { PromiseWrapper } from 'angular2/src/facade/async' ;
@@ -180,14 +180,12 @@ export function main() {
180180 var refPromise2 = bootstrap ( HelloRootCmp2 , testBindings ) ;
181181
182182 PromiseWrapper . all ( [ refPromise1 , refPromise2 ] )
183- . then ( ( refs ) => {
184- var registry = ( < Injector > refs [ 0 ] . injector ) . get ( TestabilityRegistry ) ;
185- PromiseWrapper . all ( [
186- refs [ 0 ]
187- . injector . asyncGet ( Testability ) ,
188- refs [ 1 ] . injector . asyncGet ( Testability )
189- ] )
190- . then ( ( testabilities ) => {
183+ . then ( ( refs : ApplicationRef [ ] ) => {
184+ var registry = refs [ 0 ] . injector . get ( TestabilityRegistry ) ;
185+ var testabilities =
186+ [ refs [ 0 ] . injector . asyncGet ( Testability ) , refs [ 1 ] . injector . asyncGet ( Testability ) ] ;
187+ PromiseWrapper . all ( testabilities )
188+ . then ( ( testabilities : Testability [ ] ) => {
191189 expect ( registry . findTestabilityInTree ( el ) ) . toEqual ( testabilities [ 0 ] ) ;
192190 expect ( registry . findTestabilityInTree ( el2 ) ) . toEqual ( testabilities [ 1 ] ) ;
193191 async . done ( ) ;
0 commit comments