Skip to content

Commit 7b8e33a

Browse files
authored
chore(tests): do not use outdated fs.rmdir API (#487)
1 parent e1abb83 commit 7b8e33a

File tree

2 files changed

+357
-360
lines changed

2 files changed

+357
-360
lines changed

tests/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ it(`should be able to show the latest version`, async () => {
835835
});
836836

837837
// Should keep working if the home folder is removed
838-
await xfs.rmdirPromise(process.env.COREPACK_HOME as any, {recursive: true});
838+
await xfs.rmPromise(process.env.COREPACK_HOME as any, {recursive: true});
839839
await expect(runCli(cwd, [`yarn`, `--version`])).resolves.toMatchObject({
840840
exitCode: 0,
841841
stdout: /^1\.\d+\.\d+\r?\n$/,
@@ -972,7 +972,7 @@ describe(`handle integrity checks`, () => {
972972
if (process.version.startsWith(`v18.`) && os.platform() === `win32`) return;
973973

974974
// Removing home directory to force the "re-download"
975-
await xfs.rmdirPromise(process.env.COREPACK_HOME as any, {recursive: true});
975+
await xfs.rmPromise(process.env.COREPACK_HOME as any, {recursive: true});
976976

977977
await Promise.all([
978978
expect(runCli(cwd, [`use`, `pnpm`], true)).resolves.toMatchObject({

0 commit comments

Comments
 (0)