mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-22 20:58:05 +08:00
support multi-subject attestations
Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
16
packages/attest/__tests__/attest.test.ts
Normal file
16
packages/attest/__tests__/attest.test.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import {attest} from '../src/attest'
|
||||
|
||||
describe('attest', () => {
|
||||
describe('when no subject information is provided', () => {
|
||||
it('throws an error', async () => {
|
||||
const options = {
|
||||
predicateType: 'foo',
|
||||
predicate: {bar: 'baz'},
|
||||
token: 'token'
|
||||
}
|
||||
expect(attest(options)).rejects.toThrowError(
|
||||
'Must provide either subjectName and subjectDigest or subjects'
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user