File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed
Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -24,28 +24,22 @@ const tick = (ms: number) => {
2424describe ( 'Reconnect' , ( ) => {
2525 let testContainer : HTMLDivElement ;
2626
27- beforeAll ( ( done ) => {
27+ beforeAll ( async ( ) => {
2828 testContainer = document . createElement ( 'div' ) ;
2929 document . body . appendChild ( testContainer ) ;
30- destroyPlatform ( ) ;
31- platformBrowser ( )
32- . bootstrapModule ( TestModule )
33- . then ( ( ref ) => {
34- const injector = ref . injector ;
35- const cfr : ComponentFactoryResolver = injector . get ( ComponentFactoryResolver ) ;
36-
37- testElements . forEach ( ( comp ) => {
38- const compFactory = cfr . resolveComponentFactory ( comp ) ;
39- customElements . define ( compFactory . selector , createCustomElement ( comp , { injector} ) ) ;
40- } ) ;
41- } )
42- . then ( done , done . fail ) ;
30+ const ref = await platformBrowser ( ) . bootstrapModule ( TestModule ) ;
31+ const injector = ref . injector ;
32+ const cfr : ComponentFactoryResolver = injector . get ( ComponentFactoryResolver ) ;
33+
34+ testElements . forEach ( ( comp ) => {
35+ const compFactory = cfr . resolveComponentFactory ( comp ) ;
36+ customElements . define ( compFactory . selector , createCustomElement ( comp , { injector} ) ) ;
37+ } ) ;
4338 } ) ;
4439
4540 afterAll ( ( ) => {
4641 destroyPlatform ( ) ;
4742 testContainer . remove ( ) ;
48- ( testContainer as any ) = null ;
4943 } ) ;
5044
5145 it ( 'should be able to rebuild and reconnect after direct disconnection from parent' , async ( ) => {
You can’t perform that action at this time.
0 commit comments