Skip to content

Commit 4a7ea23

Browse files
committed
ci: fix update test to work when @angular/cli and @angular/core majors diverge
During releases, there is a brief time where `@angular/core` has released the next version, but `@angular/cli` has not. This test currently fails in such a situation because `@angular/cli` wasn't new enough to trigger the multiple versions upgrade. This fix upgrades `@angular/core` instead, so it will always be consistent. (cherry picked from commit 8f1613d)
1 parent 5a123a6 commit 4a7ea23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/legacy-cli/e2e/tests/update/update-multiple-versions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default async function () {
1515
extraArgs.push('--next');
1616
}
1717

18-
// Update Angular from v12 to 13
18+
// Update Angular from v13 to 14
1919
const { stdout } = await ng('update', ...extraArgs);
2020
if (!/@angular\/core\s+13\.\d\.\d+ -> 14\.\d\.\d+\s+ng update @angular\/core@14/.test(stdout)) {
2121
// @angular/core 13.x.x -> 14.x.x ng update @angular/core@14
@@ -25,14 +25,14 @@ export default async function () {
2525
);
2626
}
2727

28-
const { message } = await expectToFail(() => ng('update', '@angular/cli', ...extraArgs));
28+
const { message } = await expectToFail(() => ng('update', '@angular/core', ...extraArgs));
2929
if (
3030
!message.includes(
31-
`Updating multiple major versions of '@angular/cli' at once is not supported`,
31+
`Updating multiple major versions of '@angular/core' at once is not supported`,
3232
)
3333
) {
3434
throw new Error(
35-
`Expected error message to include "Updating multiple major versions of '@angular/cli' at once is not supported" but didn't. OUTPUT: \n` +
35+
`Expected error message to include "Updating multiple major versions of '@angular/core' at once is not supported" but didn't. OUTPUT: \n` +
3636
message,
3737
);
3838
}

0 commit comments

Comments
 (0)