Add negative test for createArchives

This commit is contained in:
boxofyellow
2024-01-25 08:34:02 -08:00
committed by ddivad195
parent 983c5e7554
commit e144688ccc
+5 -1
View File
@@ -75,7 +75,11 @@ describe('createArchives', () => {
expect(tarSHA).toEqual(systemTarHash)
})
// TODO: Test the failure cases
it('creates archives fails if destination cannot be reached', async () => {
await expect(
fsHelper.createArchives('/this/destination/path/does/not/exist', tmpDir)
).rejects.toThrow(/^ENOENT: no such file or directory, lstat/)
})
})
describe('createTempDir', () => {