Files
admin-web/src/modules/audit/presentation.test.ts
T

15 lines
565 B
TypeScript
Raw Normal View History

2026-08-17 19:52:04 +08:00
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('—')
})
})