Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix update test to work when @angular/cli and @angular/core majors diverge #24270

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/legacy-cli/e2e/tests/update/update-multiple-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default async function () {
extraArgs.push('--next');
}

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

const { message } = await expectToFail(() => ng('update', '@angular/cli', ...extraArgs));
const { message } = await expectToFail(() => ng('update', '@angular/core', ...extraArgs));
if (
!message.includes(
`Updating multiple major versions of '@angular/cli' at once is not supported`,
`Updating multiple major versions of '@angular/core' at once is not supported`,
)
) {
throw new Error(
`Expected error message to include "Updating multiple major versions of '@angular/cli' at once is not supported" but didn't. OUTPUT: \n` +
`Expected error message to include "Updating multiple major versions of '@angular/core' at once is not supported" but didn't. OUTPUT: \n` +
message,
);
}
Expand Down