12 lines
490 B
TypeScript
12 lines
490 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|||
|
|
import { loadingListStatusLabel } from './status'
|
||
|
|
|
||
|
|
describe('loading list status labels', () => {
|
||
|
|
it('translates known states and hides unknown backend enums', () => {
|
||
|
|
expect(loadingListStatusLabel('EDITING')).toBe('预装柜中')
|
||
|
|
expect(loadingListStatusLabel('COMPLETED')).toBe('装柜完成')
|
||
|
|
expect(loadingListStatusLabel('NEW_LOADING_STATE')).toBe('未知状态')
|
||
|
|
expect(loadingListStatusLabel(null)).toBe('—')
|
||
|
|
})
|
||
|
|
})
|