优化
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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('EXPORT')).toBe('出口业务')
|
||||
})
|
||||
|
||||
it('does not expose unknown backend codes', () => {
|
||||
expect(firstLegTransportModeLabel('NEW_MODE')).toBe('未知类型')
|
||||
expect(firstLegTaxModeLabel(null)).toBe('—')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user