diff --git a/__tests__/unit/predicate.test.ts b/__tests__/unit/predicate.test.ts index 56b942d..6d08b8b 100644 --- a/__tests__/unit/predicate.test.ts +++ b/__tests__/unit/predicate.test.ts @@ -90,7 +90,7 @@ describe('predicateFromInputs', () => { predicate: 'not valid json' } - await expect(predicateFromInputs(inputs)).rejects.toThrow() + await expect(predicateFromInputs(inputs)).rejects.toThrow(/JSON/) }) }) @@ -136,7 +136,7 @@ describe('predicateFromInputs', () => { predicatePath: filePath } - await expect(predicateFromInputs(inputs)).rejects.toThrow() + await expect(predicateFromInputs(inputs)).rejects.toThrow(/JSON/) }) }) }) diff --git a/__tests__/unit/sbom.test.ts b/__tests__/unit/sbom.test.ts index 1f0e625..39613a5 100644 --- a/__tests__/unit/sbom.test.ts +++ b/__tests__/unit/sbom.test.ts @@ -38,7 +38,7 @@ describe('parseSBOMFromPath', () => { const filePath = path.join(tempDir, 'invalid.json') await fs.writeFile(filePath, 'not valid json') - await expect(parseSBOMFromPath(filePath)).rejects.toThrow() + await expect(parseSBOMFromPath(filePath)).rejects.toThrow(/JSON/) }) it('should throw when file exceeds maximum size', async () => {