first commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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'],
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user