mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-11-18 14:51:07 +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)
|
||||
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user