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
This commit is contained in:
Pete Bacon Darwin 2018-12-04 13:19:11 +00:00 committed by Igor Minar
parent 145121a75d
commit 486f69fcac
1 changed files with 3 additions and 3 deletions

View File

@ -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);
});
}));