From 4a2602dd581ae590d6b9eb15ae732c90a4e35e24 Mon Sep 17 00:00:00 2001 From: Luke Tomlinson Date: Thu, 31 Mar 2022 14:39:39 -0400 Subject: [PATCH] Fix test for windows 2022 (#1039) --- packages/io/__tests__/io.test.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/io/__tests__/io.test.ts b/packages/io/__tests__/io.test.ts index 0f1b3842..8c10f86d 100644 --- a/packages/io/__tests__/io.test.ts +++ b/packages/io/__tests__/io.test.ts @@ -332,23 +332,9 @@ describe('rmRF', () => { await assertExists(filePath) const fd = await fs.open(filePath, 'r') + await io.rmRF(testPath) - let worked: boolean - - try { - await io.rmRF(testPath) - worked = true - } catch (err) { - worked = false - } - - if (os.platform() === 'win32') { - expect(worked).toBe(false) - await assertExists(testPath) - } else { - expect(worked).toBe(true) - await assertNotExists(testPath) - } + await assertNotExists(testPath) await fd.close() await io.rmRF(testPath)