Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/legacy-cli/e2e/tests/commands/add/version-specifier.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { appendFile } from 'node:fs/promises';
import { expectFileToMatch, rimraf } from '../../../utils/fs';
import { expectFileToMatch } from '../../../utils/fs';
import { getActivePackageManager, uninstallPackage } from '../../../utils/packages';
import { ng } from '../../../utils/process';
import { isPrereleaseCli } from '../../../utils/project';

export default async function () {
// forcibly remove in case another test doesn't clean itself up.
await rimraf('node_modules/@angular/localize');
await uninstallPackage('@angular/localize');

// If using npm, enable the force option to allow testing the output behavior of the
// If using npm, enable the legacy-peer-deps option to allow testing the output behavior of the
// `ng add` command itself and not the behavior of npm which may otherwise fail depending
// on the npm version in use and the version specifier supplied in each test.
if (getActivePackageManager() === 'npm') {
await appendFile('.npmrc', '\nforce=true\n');
await appendFile('.npmrc', '\nlegacy-peer-deps=true\n');
}

const tag = isPrereleaseCli() ? '@next' : '';
Expand Down