mirror of https://github.com/actions/toolkit
Fix test for windows 2022 (#1039)
parent
745f129332
commit
4a2602dd58
|
@ -332,23 +332,9 @@ describe('rmRF', () => {
|
||||||
await assertExists(filePath)
|
await assertExists(filePath)
|
||||||
|
|
||||||
const fd = await fs.open(filePath, 'r')
|
const fd = await fs.open(filePath, 'r')
|
||||||
|
|
||||||
let worked: boolean
|
|
||||||
|
|
||||||
try {
|
|
||||||
await io.rmRF(testPath)
|
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 fd.close()
|
||||||
await io.rmRF(testPath)
|
await io.rmRF(testPath)
|
||||||
|
|
Loading…
Reference in New Issue