Fix parseSBOMFromPath to check file size before reading
Co-authored-by: bdehamer <[email protected]>
This commit is contained in:
co-authored by
bdehamer
parent
d2ffba3269
commit
4734ea3b9b
@@ -17,7 +17,7 @@ describe('parseSBOMFromPath', () => {
|
||||
describe('when file does not exist', () => {
|
||||
it('throws an error', async () => {
|
||||
await expect(parseSBOMFromPath('/nonexistent/file.json')).rejects.toThrow(
|
||||
/ENOENT/
|
||||
/SBOM file not found/
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user