Skip to content

Commit 77c90ff

Browse files
committed
test: add E2E for multi-option path mapping
1 parent ea7d4e5 commit 77c90ff

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

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

+17-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default async function () {
1515
await createDir('xyz');
1616
await moveFile(
1717
'node_modules/@angular/common',
18-
'xyz/common'
18+
'xyz/common',
1919
);
2020

2121
await expectToFail(() => ng('build'));
@@ -27,6 +27,22 @@ export default async function () {
2727
});
2828
await ng('build');
2929

30+
await updateJsonFile('tsconfig.json', tsconfig => {
31+
tsconfig.compilerOptions.paths = {
32+
'*': ['./node_modules/*'],
33+
'@angular/common': [ './xyz/common' ],
34+
};
35+
});
36+
await ng('build');
37+
38+
await updateJsonFile('tsconfig.json', tsconfig => {
39+
tsconfig.compilerOptions.paths = {
40+
'@angular/common': [ './xyz/common' ],
41+
'*': ['./node_modules/*'],
42+
};
43+
});
44+
await ng('build');
45+
3046
await updateJsonFile('tsconfig.json', tsconfig => {
3147
delete tsconfig.compilerOptions.paths;
3248
});

0 commit comments

Comments
 (0)