9 lines
621 B
TypeScript
9 lines
621 B
TypeScript
import { describe,expect,it } from 'vitest'
|
|
import { kbxTelemetryCatalog,kbxUxMetricCatalog } from '@kbx/contracts'
|
|
|
|
describe('KBX telemetry contract',()=>{
|
|
it('contains Manual Intervention Rate',()=>expect(kbxUxMetricCatalog.manual_intervention_rate).toBeTruthy())
|
|
it('never allows raw identity attributes',()=>{for(const event of Object.values(kbxTelemetryCatalog)){expect(event.allowedAttributes.join('|')).not.toMatch(/phone|address|orderNo|customer|barcode|keyword|query|entityId/i)}})
|
|
it('requires duration for completion metrics',()=>expect(kbxTelemetryCatalog['task.complete'].requiresDuration).toBe(true))
|
|
})
|