12 lines
564 B
TypeScript
12 lines
564 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { truckAppointmentActionLabel, truckAppointmentStatusLabel } from './types'
|
|
|
|
describe('truck appointment status labels', () => {
|
|
it('translates status history without exposing backend enum values', () => {
|
|
expect(truckAppointmentStatusLabel('DISPATCHED')).toBe('已派车')
|
|
expect(truckAppointmentStatusLabel('NEW_STATUS')).toBe('未知状态')
|
|
expect(truckAppointmentActionLabel('DISPATCH')).toBe('确认派车')
|
|
expect(truckAppointmentActionLabel('NEW_ACTION')).toBe('状态更新')
|
|
})
|
|
})
|