mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-01-04 05:12:55 +08:00
Fix test for windows 2022 (#1039)
This commit is contained in:
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…
x
Reference in New Issue
Block a user