diff --git a/modules/@angular/core/test/linker/integration_spec.ts b/modules/@angular/core/test/linker/integration_spec.ts index 3749e655f9..a4ce0e59b1 100644 --- a/modules/@angular/core/test/linker/integration_spec.ts +++ b/modules/@angular/core/test/linker/integration_spec.ts @@ -1380,35 +1380,39 @@ function declareTests({useJit, viewEngine}: {useJit: boolean, viewEngine: boolea })); } - it('should specify a location of an error that happened during change detection (text)', - () => { - TestBed.configureTestingModule({declarations: [MyComp]}); - const template = '
{{a.b}}
'; - TestBed.overrideComponent(MyComp, {set: {template}}); - const fixture = TestBed.createComponent(MyComp); + // TODO(tbosch): delete these tests once view engine is the default as we handle + // these errors via source maps! + if (!viewEngine) { + it('should specify a location of an error that happened during change detection (text)', + () => { + TestBed.configureTestingModule({declarations: [MyComp]}); + const template = '
{{a.b}}
'; + TestBed.overrideComponent(MyComp, {set: {template}}); + const fixture = TestBed.createComponent(MyComp); - expect(() => fixture.detectChanges()).toThrowError(/:0:5/); - }); + expect(() => fixture.detectChanges()).toThrowError(/:0:5/); + }); - it('should specify a location of an error that happened during change detection (element property)', - () => { - TestBed.configureTestingModule({declarations: [MyComp]}); - const template = '
'; - TestBed.overrideComponent(MyComp, {set: {template}}); - const fixture = TestBed.createComponent(MyComp); + it('should specify a location of an error that happened during change detection (element property)', + () => { + TestBed.configureTestingModule({declarations: [MyComp]}); + const template = '
'; + TestBed.overrideComponent(MyComp, {set: {template}}); + const fixture = TestBed.createComponent(MyComp); - expect(() => fixture.detectChanges()).toThrowError(/:0:5/); - }); + expect(() => fixture.detectChanges()).toThrowError(/:0:5/); + }); - it('should specify a location of an error that happened during change detection (directive property)', - () => { - TestBed.configureTestingModule({declarations: [MyComp, ChildComp, MyDir]}); - const template = ''; - TestBed.overrideComponent(MyComp, {set: {template}}); - const fixture = TestBed.createComponent(MyComp); + it('should specify a location of an error that happened during change detection (directive property)', + () => { + TestBed.configureTestingModule({declarations: [MyComp, ChildComp, MyDir]}); + const template = ''; + TestBed.overrideComponent(MyComp, {set: {template}}); + const fixture = TestBed.createComponent(MyComp); - expect(() => fixture.detectChanges()).toThrowError(/:0:11/); - }); + expect(() => fixture.detectChanges()).toThrowError(/:0:11/); + }); + } }); it('should support imperative views', () => {