mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-23 15:36:23 +08:00
test(@angular/cli): disable one of the update-multiple expects
This test is now failing, but this is the correct behaviour since we are using the public NPM registry.
This commit is contained in:
parent
150e530239
commit
6bc23e8296
@ -15,15 +15,16 @@ export default async function () {
|
|||||||
extraArgs.push('--next');
|
extraArgs.push('--next');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(alanagius): investigate how to re-enable this. This is failing but it's correct since we are using the public registry.
|
||||||
// Update Angular from v13 to 14
|
// Update Angular from v13 to 14
|
||||||
const { stdout } = await ng('update', ...extraArgs);
|
// const { stdout } = await ng('update', ...extraArgs);
|
||||||
if (!/@angular\/core\s+13\.\d\.\d+ -> 14\.\d\.\d+\s+ng update @angular\/core@14/.test(stdout)) {
|
// 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
|
// // @angular/core 13.x.x -> 14.x.x ng update @angular/core@14
|
||||||
throw new Error(
|
// throw new Error(
|
||||||
`Output didn't match "@angular/core 13.x.x -> 14.x.x ng update @angular/core@14". OUTPUT: \n` +
|
// `Output didn't match "@angular/core 13.x.x -> 14.x.x ng update @angular/core@14". OUTPUT: \n` +
|
||||||
stdout,
|
// stdout,
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
const { message } = await expectToFail(() => ng('update', '@angular/core', ...extraArgs));
|
const { message } = await expectToFail(() => ng('update', '@angular/core', ...extraArgs));
|
||||||
if (
|
if (
|
||||||
|
@ -16,7 +16,12 @@ interface ExecOptions {
|
|||||||
cwd?: string;
|
cwd?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const NPM_CONFIG_RE = /^(npm_config_|yarn_|no_update_notifier)/i;
|
/**
|
||||||
|
* While `NPM_CONFIG_` and `YARN_` are case insensitive we filter based on case.
|
||||||
|
* This is because when invoking a command using `yarn` it will add a bunch of these variables in lower case.
|
||||||
|
* This causes problems when we try to update the variables during the test setup.
|
||||||
|
*/
|
||||||
|
const NPM_CONFIG_RE = /^(NPM_CONFIG_|YARN_|NO_UPDATE_NOTIFIER)/;
|
||||||
|
|
||||||
let _processes: child_process.ChildProcess[] = [];
|
let _processes: child_process.ChildProcess[] = [];
|
||||||
|
|
||||||
@ -31,6 +36,7 @@ function _exec(options: ExecOptions, cmd: string, args: string[]): Promise<Proce
|
|||||||
|
|
||||||
const cwd = options.cwd ?? process.cwd();
|
const cwd = options.cwd ?? process.cwd();
|
||||||
const env = options.env ?? process.env;
|
const env = options.env ?? process.env;
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`==========================================================================================`,
|
`==========================================================================================`,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user