Skip to content

Commit 54e4acb

Browse files
clydindgp1130
authored andcommitted
test: update module resolution E2E for latest framework changes
The `module-resolution-core-mapping` E2E test modifies the tsconfig path mapping settings to change the location of `@angular/common`. However, with recent changes to the framework, the `@angular/platform-browser` package now also depends on `@angular/common/http` (a secondary export). This secondary export was not mapped in the test which resulted in the test failing since the build could not find the export. Related FW change: angular/angular@81e7d15 (cherry picked from commit e66698a)
1 parent 1922147 commit 54e4acb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/legacy-cli/e2e/tests/misc/module-resolution/module-resolution-core-mapping.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@ export default async function () {
1212
await ng('build', '--configuration=development');
1313

1414
await createDir('xyz');
15-
await moveFile('node_modules/@angular/common', 'xyz/common');
15+
await moveFile('node_modules/@angular/platform-browser', 'xyz/platform-browser');
1616
await expectToFail(() => ng('build', '--configuration=development'));
1717

1818
await updateJsonFile('tsconfig.json', (tsconfig) => {
1919
tsconfig.compilerOptions.paths = {
20-
'@angular/common': ['./xyz/common'],
20+
'@angular/platform-browser': ['./xyz/platform-browser'],
2121
};
2222
});
2323
await ng('build', '--configuration=development');
2424

2525
await updateJsonFile('tsconfig.json', (tsconfig) => {
2626
tsconfig.compilerOptions.paths = {
2727
'*': ['./node_modules/*'],
28-
'@angular/common': ['./xyz/common'],
28+
'@angular/platform-browser': ['./xyz/platform-browser'],
2929
};
3030
});
3131
await ng('build', '--configuration=development');
3232

3333
await updateJsonFile('tsconfig.json', (tsconfig) => {
3434
tsconfig.compilerOptions.paths = {
35-
'@angular/common': ['./xyz/common'],
35+
'@angular/platform-browser': ['./xyz/platform-browser'],
3636
'*': ['./node_modules/*'],
3737
};
3838
});
3939
await ng('build', '--configuration=development');
40-
await moveFile('xyz/common', 'node_modules/@angular/common');
40+
await moveFile('xyz/platform-browser', 'node_modules/@angular/platform-browser');
4141
}

0 commit comments

Comments
 (0)