优化
This commit is contained in:
@@ -2,6 +2,7 @@ import { describe, expect, it } from 'vitest'
|
||||
import {
|
||||
SMART_LOADING_CHANNEL_GROUPS,
|
||||
SMART_LOADING_WAREHOUSE_GROUPS,
|
||||
isSeaRailChannel,
|
||||
resolveSmartLoadingChannelGroup,
|
||||
resolveSmartLoadingWarehouseGroup,
|
||||
} from './smartLoadingChannelGroups'
|
||||
@@ -33,6 +34,11 @@ describe('smartLoadingChannelGroups', () => {
|
||||
expect(resolveSmartLoadingChannelGroup('UNKNOWN', '未确认新渠道')).toBeNull()
|
||||
})
|
||||
|
||||
it('identifies canonical and legacy sea-rail channel codes', () => {
|
||||
expect(['EXX_RAIL_NY', 'NYEXX', 'OA_CHICAGO_RAIL', 'CPHT'].every(isSeaRailChannel)).toBe(true)
|
||||
expect(isSeaRailChannel('OA_LA_TRUCK')).toBe(false)
|
||||
})
|
||||
|
||||
it('exposes Yiwu and Dongguan as the fixed top-level warehouses', () => {
|
||||
expect(SMART_LOADING_WAREHOUSE_GROUPS.map((group) => group.name)).toEqual(['义乌仓', '东莞仓'])
|
||||
expect(resolveSmartLoadingWarehouseGroup('义乌国内仓')?.code).toBe('YIWU')
|
||||
|
||||
Reference in New Issue
Block a user