1
0
Fork 0
pull/1344/head
Cory Miller 2023-02-21 19:44:40 +00:00
parent 5261f00994
commit 1e057c1e35
1 changed files with 6 additions and 6 deletions

View File

@ -339,19 +339,19 @@ describe('rmRF', () => {
await io.mkdirP(testPath) await io.mkdirP(testPath)
await assertExists(testPath) await assertExists(testPath)
// can't remove folder with locked file on windows
const filePath = path.join(testPath, 'file.txt') const filePath = path.join(testPath, 'file.txt')
await fs.appendFile(filePath, 'some data') await fs.appendFile(filePath, 'some data')
await assertExists(filePath) await assertExists(filePath)
const fd = await fs.open(filePath, 'r') const fd = await fs.open(filePath, 'r')
const files = await ioUtil.readdir(getTestTemp())
for (const file of files) {
console.log(file)
}
await io.rmRF(testPath) await io.rmRF(testPath)
// can't remove folder with locked file on windows
if (ioUtil.IS_WINDOWS) {
await assertExists(testPath)
} else {
await assertNotExists(testPath) await assertNotExists(testPath)
}
await fd.close() await fd.close()
await io.rmRF(testPath) await io.rmRF(testPath)