26 lines
714 B
TypeScript
26 lines
714 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { reportSchema } from '../../../src/schemas/reports'
|
|
|
|
describe('reportSchema', () => {
|
|
it('accepts the backend-defined arbitrary report summary', () => {
|
|
const result = reportSchema.parse({
|
|
run_id: 1,
|
|
summary: {
|
|
test_result: { passed: 8, failed: 2 },
|
|
admission: {
|
|
decision: 'NOT_EVALUATED',
|
|
coverage: { evaluated: 0, total: 10 },
|
|
evidence: ['retired'],
|
|
unmet_evidence: ['retired'],
|
|
},
|
|
missing_metrics: ['retired'],
|
|
},
|
|
})
|
|
|
|
expect(result.summary).toMatchObject({
|
|
test_result: { passed: 8, failed: 2 },
|
|
missing_metrics: ['retired'],
|
|
})
|
|
})
|
|
})
|