Files
KArtSell.Aegis/docs/Design/kbx-foundation-v60-status-canonical-contract-hardening/tests/unit/kbx-screen-recipe.contract.spec.ts
T
kjh2064 3f293d8aa8
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s
V13-FE-006: consolidate approved UI and contract hardening
2026-08-13 02:41:00 +09:00

26 lines
1.3 KiB
TypeScript

import { describe, expect, it } from 'vitest'
import { kbxScreenRecipeCatalog, kbxScreenRecipeVerificationCatalog } from '@kbx/contracts'
import { kbxTemplateManifest } from '@kbx/ui'
describe('KBX screen recipes',()=>{
it('closes every T01-T09 template to an implementation and verification recipe',()=>{
expect(Object.keys(kbxScreenRecipeCatalog)).toHaveLength(9)
for(const template of kbxTemplateManifest){
const recipe=kbxScreenRecipeCatalog[template.code]
const verification=kbxScreenRecipeVerificationCatalog[template.code]
expect(recipe.type).toBe(template.type)
expect(recipe.templateComponent).toBe(template.component)
expect(recipe.requiredPolicies.length).toBeGreaterThan(0)
expect(recipe.recoveryPolicies.length).toBeGreaterThan(0)
expect(recipe.securityPolicies.length).toBeGreaterThan(0)
expect(recipe.canonicalScenarioIds.length).toBeGreaterThan(0)
expect(recipe.testProfile.requiredChecks.length).toBeGreaterThan(0)
expect(recipe.testProfile.requiredScenarioKinds).toContain('e2e')
expect(verification.complete).toBe(true)
expect(verification.missingScenarioKinds).toEqual([])
expect(verification.missingTags).toEqual([])
expect(verification.missingEvidence).toEqual([])
}
})
})