import { describe, expect, it } from 'vitest' import { firstLegBusinessTypeLabel, firstLegContainerModeLabel, firstLegDestinationTypeLabel, firstLegPickupMethodLabel, firstLegTaxModeLabel, firstLegTradeTermLabel, firstLegTransportModeLabel, } from './firstLegBusinessLabels' describe('first-leg business labels', () => { it('translates business codes using the customer order contract', () => { expect(firstLegTransportModeLabel('SEA')).toBe('海运') expect(firstLegTradeTermLabel('FOB')).toBe('FOB(离岸价)') expect(firstLegPickupMethodLabel('PICKUP')).toBe('平台上门提货') expect(firstLegTaxModeLabel('BUY_DECLARATION')).toBe('买单报关') expect(firstLegContainerModeLabel('FULL_CONTAINER')).toBe('整柜') expect(firstLegDestinationTypeLabel('OVERSEAS')).toBe('海外仓') expect(firstLegBusinessTypeLabel('OVERSEAS_SEA')).toBe('海外仓海运') expect(firstLegBusinessTypeLabel('PRIVATE_SEA')).toBe('私人地址海运') expect(firstLegBusinessTypeLabel('EXPORT')).toBe('出口业务') }) it('does not expose unknown backend codes', () => { expect(firstLegTransportModeLabel('NEW_MODE')).toBe('未知类型') expect(firstLegTaxModeLabel(null)).toBe('—') }) })