1
0
Fork 0

Fix test for windows 2022 (#1039)

pull/1042/head
Luke Tomlinson 2022-03-31 14:39:39 -04:00 committed by GitHub
parent 745f129332
commit 4a2602dd58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 16 deletions

View File

@ -332,23 +332,9 @@ describe('rmRF', () => {
await assertExists(filePath)
const fd = await fs.open(filePath, 'r')
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 fd.close()
await io.rmRF(testPath)