2024-02-18 03:14:10 +00:00
|
|
|
import {buildIntotoStatement} from '../src/intoto'
|
|
|
|
import type {Predicate, Subject} from '../src/shared.types'
|
|
|
|
|
|
|
|
describe('buildIntotoStatement', () => {
|
|
|
|
const subject: Subject = {
|
|
|
|
name: 'subjecty',
|
|
|
|
digest: {
|
|
|
|
sha256: '7d070f6b64d9bcc530fe99cc21eaaa4b3c364e0b2d367d7735671fa202a03b32'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const predicate: Predicate = {
|
|
|
|
type: 'predicatey',
|
|
|
|
params: {
|
|
|
|
key: 'value'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-22 02:25:36 +00:00
|
|
|
it('returns an intoto statement', () => {
|
2024-10-30 17:55:36 +00:00
|
|
|
const statement = buildIntotoStatement([subject], predicate)
|
2024-02-18 03:14:10 +00:00
|
|
|
expect(statement).toMatchSnapshot()
|
|
|
|
})
|
|
|
|
})
|