diff --git a/packages/compiler-cli/test/perform_watch_spec.ts b/packages/compiler-cli/test/perform_watch_spec.ts index 4cd19b7c6a..d436ed4dda 100644 --- a/packages/compiler-cli/test/perform_watch_spec.ts +++ b/packages/compiler-cli/test/perform_watch_spec.ts @@ -119,7 +119,7 @@ describe('perform watch', () => { const errorFileContent = ` import {NgModule} from '@angular/core'; - @NgModule(() => (1===1 ? null as any : null as any)) + @NgModule((() => (1===1 ? null as any : null as any)) as any) export class MyModule {} `; const indexTsPath = path.resolve(testSupport.basePath, 'src', 'index.ts'); diff --git a/packages/compiler-cli/test/transformers/program_spec.ts b/packages/compiler-cli/test/transformers/program_spec.ts index 757e2dbf46..2c64be1f56 100644 --- a/packages/compiler-cli/test/transformers/program_spec.ts +++ b/packages/compiler-cli/test/transformers/program_spec.ts @@ -325,7 +325,7 @@ describe('ng program', () => { 'src/main.ts': ` import {NgModule} from '@angular/core'; - @NgModule(() => {if (1==1) return null as any;}) + @NgModule((() => {if (1==1) return null as any;}) as any) export class SomeClassWithInvalidMetadata {} `, }); diff --git a/packages/core/test/di/static_injector_spec.ts b/packages/core/test/di/static_injector_spec.ts index 968a0847b8..d6336ba77e 100644 --- a/packages/core/test/di/static_injector_spec.ts +++ b/packages/core/test/di/static_injector_spec.ts @@ -288,7 +288,7 @@ export function main() { Injector.create([CarWithDashboard.PROVIDER, Engine.PROVIDER, Dashboard.PROVIDER]); expect(() => injector.get(CarWithDashboard)) .toThrowError( - `StaticInjectorError[${stringify(CarWithDashboard)} -> ${stringify(Dashboard)} -> DashboardSoftware]: + `StaticInjectorError[${stringify(CarWithDashboard)} -> ${stringify(Dashboard)} -> DashboardSoftware]: NullInjectorError: No provider for DashboardSoftware!`); }); @@ -415,7 +415,7 @@ export function main() { parent); expect(() => child.get(Car)) - .toThrowError(`StaticInjectorError[${stringify(Car)} -> ${stringify(Engine)}]: + .toThrowError(`StaticInjectorError[${stringify(Car)} -> ${stringify(Engine)}]: NullInjectorError: No provider for Engine!`); }); });