feat(anatomy): before/after review drawings per view, questions of every level in the report, tests on the real changeset

This commit is contained in:
bchanot committed 2026-10-10 01:53:10 +02:00
1 parent 6870d87910
commit 1a96a1555c
7 files changed
+348 -10

No files matched your search

+12 -4
View File
@@ -27,11 +27,19 @@ const CHANGE = {
describe('curation schemas', () => {
it('parse the committed curation files', async () => {
const changeset = ChangesetSchema.parse(await committed('changes.json'))
expect(changeset.changes.map((c) => [c.id, c.priority])).toEqual([
['CHG-001', 'medium'],
])
const ids = changeset.changes.map((c) => c.id)
expect(ids[0]).toBe('CHG-001')
expect(ids).toEqual([...ids].sort())
expect(new Set(ids).size).toBe(ids.length)
expect(changeset.changes.every((c) => c.level !== 'C' || c.question)).toBe(
true,
)
const refs = ReferencesFileSchema.parse(await committed('references.json'))
expect(refs.references.map((r) => r.id)).toEqual(['legacy-catalog'])
const refIds = refs.references.map((r) => r.id)
expect(refIds).toContain('legacy-catalog')
expect(new Set(refIds).size).toBe(refIds.length)
const cited = new Set(changeset.changes.flatMap((c) => c.reference_ids))
for (const id of cited) expect(refIds).toContain(id)
})
it.each([