test
This commit is contained in:
committed by
florent Beauchamp
parent
6961361cf8
commit
5dfc8b2e0a
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user