Skip to content

Commit 9175811

Browse files
alan-agius4dgp1130
authored andcommitted
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. ```
1 parent 6983773 commit 9175811

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
@@ -58,7 +58,10 @@ export default async function () {
5858
await npm('install', '--global', '[email protected]');
5959

6060
// Ensure `ng add` shows npm warning
61-
const { stderr: stderrAdd } = await ng('add', '@angular/localize');
61+
// The below command will fail with the below due to incorrect peerDeps
62+
const { message: stderrAdd } = await expectToFail(() =>
63+
ng('add', '@angular/localize', '--skip-confirmation'),
64+
);
6265
if (!stderrAdd.includes(warningText)) {
6366
throw new Error('ng add expected to show npm version warning.');
6467
}

0 commit comments

Comments
 (0)