Files
admin-web/src/modules/inbounds/status.test.ts
T
2026-09-09 20:53:30 +08:00

16 lines
826 B
TypeScript

import { describe, expect, it } from 'vitest'
import { inboundHistoryActionLabel, inboundOrderStatusLabels, inboundProcessStatusLabels, inboundStatusLabel } from './status'
describe('inbound status presentation', () => {
it('translates process and order statuses', () => {
expect(inboundStatusLabel('PREPARING', inboundProcessStatusLabels)).toBe('订单待审核(可先测量)')
expect(inboundStatusLabel('MEASURE_PENDING', inboundProcessStatusLabels)).toBe('待测量审核')
expect(inboundStatusLabel('WAIT_SPLIT', inboundOrderStatusLabels)).toBe('待分柜')
})
it('does not expose unknown status and action codes', () => {
expect(inboundStatusLabel('NEW_STATUS', inboundProcessStatusLabels)).toBe('未知状态')
expect(inboundHistoryActionLabel('NEW_ACTION')).toBe('状态更新')
})
})