test: fix deprecated Jest matchers for v30

- Replace toThrowError() with toThrow()
- Replace toBeCalledWith() with toHaveBeenCalledWith()
- Update snapshots
This commit is contained in:
Daniel Kennedy
2026-01-30 09:44:37 -05:00
parent 59d7acc324
commit f94d96c596
14 changed files with 44 additions and 44 deletions
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`buildIntotoStatement returns an intoto statement 1`] = `
{
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`provenance functions buildSLSAProvenancePredicate returns a provenance hydrated from an OIDC token 1`] = `
{
+1 -1
View File
@@ -8,7 +8,7 @@ describe('attest', () => {
predicate: {bar: 'baz'},
token: 'token'
}
expect(attest(options)).rejects.toThrowError(
expect(attest(options)).rejects.toThrow(
'Must provide either subjectName and subjectDigest or subjects'
)
})