This commit is contained in:
ggunullu
2023-02-02 18:17:27 +01:00
committed by florent Beauchamp
parent 6961361cf8
commit 5dfc8b2e0a

View File

@@ -22,7 +22,6 @@ const {
convertToVhdDirectory,
recoverRawContent,
} = require('../tests/utils')
const { test } = require('../_bitmap')
let tempDir = null
let handler
@@ -43,6 +42,14 @@ afterEach(async () => {
disposeHandler()
})
test('checkFile fails with broken VHD file', async () => {
const vhdFile = new VhdFile(handler, 'vhdFile.vhd')
await fs.writeFile(vhdFile, ';alsdkh;lasdhfjaksdhfjklsdahfhdsl')
await expect(async () => await checkFile(vhdFile)).rejects.toThrow()
})
test('respect the checkSecondFooter flag', async () => {
const initalSize = 0
const rawFileName = `${tempDir}/randomfile`