Skip to content

Commit e1f8976

Browse files
committed
test: add missing --skip-confirmation to NPM 7 ng add test
This tests fails with ``` No terminal detected. '--skip-confirmation' can be used to bypass installation confirmation. Ensure package name is correct prior to '--skip-confirmation' option usage. Command aborted. ``` (cherry picked from commit 9175811)
1 parent 2d9fd56 commit e1f8976

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/legacy-cli/e2e/tests/misc/npm-7.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ export default async function () {
3838
await npm('install', '--global', '[email protected]');
3939

4040
// Ensure `ng add` shows npm warning
41-
const { stderr: stderrAdd } = await ng('add', '@angular/localize');
41+
// The below command will fail with the below due to incorrect peerDeps
42+
const { message: stderrAdd } = await expectToFail(() =>
43+
ng('add', '@angular/localize', '--skip-confirmation'),
44+
);
4245
if (!stderrAdd.includes(warningText)) {
4346
throw new Error('ng add expected to show npm version warning.');
4447
}

0 commit comments

Comments
 (0)