build: fix build failures (#20470)
This commit is contained in:
parent
336041aac9
commit
dcfffbf828
@ -119,7 +119,7 @@ describe('perform watch', () => {
|
|||||||
const errorFileContent = `
|
const errorFileContent = `
|
||||||
import {NgModule} from '@angular/core';
|
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 {}
|
export class MyModule {}
|
||||||
`;
|
`;
|
||||||
const indexTsPath = path.resolve(testSupport.basePath, 'src', 'index.ts');
|
const indexTsPath = path.resolve(testSupport.basePath, 'src', 'index.ts');
|
||||||
|
@ -325,7 +325,7 @@ describe('ng program', () => {
|
|||||||
'src/main.ts': `
|
'src/main.ts': `
|
||||||
import {NgModule} from '@angular/core';
|
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 {}
|
export class SomeClassWithInvalidMetadata {}
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
@ -288,7 +288,7 @@ export function main() {
|
|||||||
Injector.create([CarWithDashboard.PROVIDER, Engine.PROVIDER, Dashboard.PROVIDER]);
|
Injector.create([CarWithDashboard.PROVIDER, Engine.PROVIDER, Dashboard.PROVIDER]);
|
||||||
expect(() => injector.get(CarWithDashboard))
|
expect(() => injector.get(CarWithDashboard))
|
||||||
.toThrowError(
|
.toThrowError(
|
||||||
`StaticInjectorError[${stringify(CarWithDashboard)} -> ${stringify(Dashboard)} -> DashboardSoftware]:
|
`StaticInjectorError[${stringify(CarWithDashboard)} -> ${stringify(Dashboard)} -> DashboardSoftware]:
|
||||||
NullInjectorError: No provider for DashboardSoftware!`);
|
NullInjectorError: No provider for DashboardSoftware!`);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ export function main() {
|
|||||||
parent);
|
parent);
|
||||||
|
|
||||||
expect(() => child.get(Car))
|
expect(() => child.get(Car))
|
||||||
.toThrowError(`StaticInjectorError[${stringify(Car)} -> ${stringify(Engine)}]:
|
.toThrowError(`StaticInjectorError[${stringify(Car)} -> ${stringify(Engine)}]:
|
||||||
NullInjectorError: No provider for Engine!`);
|
NullInjectorError: No provider for Engine!`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user