15 lines
565 B
TypeScript
15 lines
565 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|||
|
|
import { auditEventLabel } from './presentation'
|
||
|
|
|
||
|
|
describe('audit event presentation', () => {
|
||
|
|
it('uses customer-facing labels for known event codes', () => {
|
||
|
|
expect(auditEventLabel('PLATFORM_TENANT_UPDATE')).toBe('编辑客户档案')
|
||
|
|
expect(auditEventLabel('TENANT_REVIEW')).toBe('客户入驻审核')
|
||
|
|
})
|
||
|
|
|
||
|
|
it('keeps unknown event codes visible for diagnosis', () => {
|
||
|
|
expect(auditEventLabel('FUTURE_CUSTOMER_EVENT')).toBe('FUTURE_CUSTOMER_EVENT')
|
||
|
|
expect(auditEventLabel('')).toBe('—')
|
||
|
|
})
|
||
|
|
})
|