test
This commit is contained in:
committed by
florent Beauchamp
parent
dd2b054b35
commit
f0b93dc7fe
@@ -94,7 +94,7 @@
|
||||
"prettify": "prettier --ignore-path .gitignore --write '**/*.{cjs,js,jsx,md,mjs,ts,tsx}'",
|
||||
"test": "npm run test-lint && npm run test-unit",
|
||||
"test-integration": "jest \".integ\\.spec\\.js$\"",
|
||||
"test-lint": "eslint --ignore-path .gitignore --ignore-pattern packages/xo-web .",
|
||||
"test-lint": "eslint --ignore-path .gitignore --ignore-pattern packages/xo-web . --ignore-pattern @xen-orchestra/vmware-explorer .",
|
||||
"test-unit": "jest \"^(?!.*\\.integ\\.spec\\.js$)\" && scripts/run-script.js --bail test"
|
||||
},
|
||||
"workspaces": [
|
||||
|
||||
@@ -22,6 +22,7 @@ const {
|
||||
convertToVhdDirectory,
|
||||
recoverRawContent,
|
||||
} = require('../tests/utils')
|
||||
const { test } = require('../_bitmap')
|
||||
|
||||
let tempDir = null
|
||||
let handler
|
||||
@@ -42,6 +43,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