Skip to content

Commit b076a42

Browse files
committed
test(@angular/cli): ignore engines in version-specifier E2E test when using yarn
1 parent 91294a4 commit b076a42

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/legacy-cli/e2e/tests/commands/add/version-specifier.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ export default async function () {
1616
await appendFile('.npmrc', '\nlegacy-peer-deps=true\n');
1717
}
1818

19+
// If using yarn, ignore engines check. Otherwise installing '@latest' package versions
20+
// might fail if they require a newer Node.js runtime version than the E2E test runner.
21+
if (getActivePackageManager() === 'yarn') {
22+
await appendFile('.yarnrc', '\nignore-engines true\n');
23+
}
24+
1925
const tag = isPrereleaseCli() ? '@next' : '';
2026

2127
await ng('add', `@angular/localize${tag}`, '--skip-confirmation');

0 commit comments

Comments
 (0)