Skip to content

Commit a210167

Browse files
authored
test(cdk/schematics): account for breaking change in CLI (#25674)
The CLI started throwing an error if a projects doesn't have a `root` property. These changes update a few of our tests that were failing because of it.
1 parent af72eda commit a210167

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

src/cdk/schematics/utils/project-tsconfig-paths.spec.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ describe('project tsconfig paths', () => {
1616
'/angular.json',
1717
JSON.stringify({
1818
version: 1,
19-
projects: {my_name: {architect: {build: {options: {tsConfig: './my-custom-config.json'}}}}},
19+
projects: {
20+
my_name: {
21+
architect: {build: {options: {tsConfig: './my-custom-config.json'}}},
22+
root: 'projects/my_name',
23+
},
24+
},
2025
}),
2126
);
2227

@@ -43,6 +48,7 @@ describe('project tsconfig paths', () => {
4348
}
4449
}
4550
}
51+
"root": "projects/with_tests"
4652
}
4753
}
4854
}`,
@@ -61,7 +67,12 @@ describe('project tsconfig paths', () => {
6167
'/angular.json',
6268
JSON.stringify({
6369
version: 1,
64-
projects: {my_name: {architect: {test: {options: {tsConfig: './my-test-config.json'}}}}},
70+
projects: {
71+
my_name: {
72+
architect: {test: {options: {tsConfig: './my-test-config.json'}}},
73+
root: 'projects/my_name',
74+
},
75+
},
6576
}),
6677
);
6778

@@ -78,7 +89,12 @@ describe('project tsconfig paths', () => {
7889
'/.angular.json',
7990
JSON.stringify({
8091
version: 1,
81-
projects: {with_tests: {architect: {test: {options: {tsConfig: './my-test-config.json'}}}}},
92+
projects: {
93+
with_tests: {
94+
architect: {test: {options: {tsConfig: './my-test-config.json'}}},
95+
root: 'projects/with_tests',
96+
},
97+
},
8298
}),
8399
);
84100

0 commit comments

Comments
 (0)