2024-10-30 10:55:36 -07:00
|
|
|
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'
|
|
|
|
|
}
|
2026-01-30 09:44:37 -05:00
|
|
|
expect(attest(options)).rejects.toThrow(
|
2024-10-30 10:55:36 -07:00
|
|
|
'Must provide either subjectName and subjectDigest or subjects'
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|