From f05b0537f555e6c5ccb2ea8397ae90ec3a2e4d83 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:52:06 -0400 Subject: [PATCH] test: unlink symlink in ng add base E2E test Instead of attempting to delete all files within the directory, the created symlink can instead be removed on its own. This should prevent odd Windows failures in CI. --- tests/legacy-cli/e2e/tests/commands/add/base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/commands/add/base.ts b/tests/legacy-cli/e2e/tests/commands/add/base.ts index ba5978633225..f4e7048df6ac 100644 --- a/tests/legacy-cli/e2e/tests/commands/add/base.ts +++ b/tests/legacy-cli/e2e/tests/commands/add/base.ts @@ -1,5 +1,5 @@ import { assetDir } from '../../../utils/assets'; -import { expectFileToExist, rimraf, symlinkFile } from '../../../utils/fs'; +import { deleteFile, expectFileToExist, symlinkFile } from '../../../utils/fs'; import { ng } from '../../../utils/process'; import { expectToFail } from '../../../utils/utils'; @@ -15,5 +15,5 @@ export default async function () { await expectToFail(() => ng('add', 'add-collection')); // File already exists. // Cleanup the package - await rimraf('node_modules/add-collection'); + await deleteFile('node_modules/add-collection'); }