V13-FE-011: finalize search list layout slice

This commit is contained in:
2026-08-09 02:57:26 +09:00
parent 9efd202e76
commit 6422cb2b13
984 changed files with 120811 additions and 1498 deletions
@@ -0,0 +1,22 @@
import { describe, expect, it } from 'vitest'
import { isKbxProblem, kbxApiCatalog } from '@kbx/contracts'
describe('KBX API contract', () => {
it('keeps operation IDs and routes unique', () => {
const operations = Object.values(kbxApiCatalog)
expect(new Set(operations.map(x => x.id)).size).toBe(operations.length)
expect(new Set(operations.map(x => `${x.method} ${x.path}`)).size).toBe(operations.length)
})
it('requires a stable key only for mutation operations', () => {
const required = Object.values(kbxApiCatalog).filter(x => x.idempotency === 'required')
expect(required.length).toBeGreaterThan(0)
expect(required.every(x => x.method !== 'GET')).toBe(true)
})
it('recognizes the public problem discriminator family', () => {
for (const type of ['validation','business-rule','conflict','permission','not-found','integration','system']) {
expect(isKbxProblem({ type, title: 'test' })).toBe(true)
}
})
})