From 486f69fcacf5200b81c0d772e379b8a47e2bf286 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Tue, 4 Dec 2018 13:19:11 +0000 Subject: [PATCH] test(upgrade): do not lock up browser when unit test fails (#27454) Previously, if the two injectors are not the same, jasmine tried to display an error message, but it got stuck in an infinite loop trying to render the injectors that were different. PR Close #27454 --- .../test/static/integration/downgrade_component_spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/upgrade/test/static/integration/downgrade_component_spec.ts b/packages/upgrade/test/static/integration/downgrade_component_spec.ts index 4ca5bb86b2..9b23b32d33 100644 --- a/packages/upgrade/test/static/integration/downgrade_component_spec.ts +++ b/packages/upgrade/test/static/integration/downgrade_component_spec.ts @@ -741,9 +741,9 @@ withEachNg1Version(() => { }); })); - fixmeIvy('FW-717: Browser locks up and disconnects') && + fixmeIvy( + 'FW-717: Injector on lazy loaded components are not the same as their NgModule\'s injector') && it('should work with ng2 lazy loaded components', async(() => { - let componentInjector: Injector; @Component({selector: 'ng2', template: ''}) @@ -787,7 +787,7 @@ withEachNg1Version(() => { childMod.componentFactoryResolver.resolveComponentFactory(LazyLoadedComponent) !; const lazyCmp = cmpFactory.create(componentInjector); - expect(lazyCmp.instance.module.injector).toBe(childMod.injector); + expect(lazyCmp.instance.module.injector === childMod.injector).toBe(true); }); }));