This commit is contained in:
2026-08-17 19:52:04 +08:00
parent d618683467
commit ee4cd35927
42 changed files with 702 additions and 226 deletions
+14
View File
@@ -0,0 +1,14 @@
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('—')
})
})