import { describe, expect, it } from 'vitest' import { oceanBookingStatusLabel, oceanBookingStatusOptions } from './status' describe('ocean booking status labels', () => { it('translates every backend status for selectors and badges', () => { expect(oceanBookingStatusOptions).toEqual([ { value: 'CONFIRMED', label: '已确认' }, { value: 'RELEASED', label: '已放舱' }, { value: 'CHANGE_PENDING', label: '变更中' }, { value: 'CANCELLED', label: '已取消' }, ]) }) it('does not leak unknown backend enum values to users', () => { expect(oceanBookingStatusLabel('NEW_BACKEND_STATUS')).toBe('未知状态') expect(oceanBookingStatusLabel(null)).toBe('未设置') }) })