17 lines
536 B
TypeScript
17 lines
536 B
TypeScript
|
|
import { describe, expect, it } from 'vitest'
|
||
|
|
import { transitionAlertStatus } from '../risk'
|
||
|
|
|
||
|
|
describe('transitionAlertStatus', () => {
|
||
|
|
it('moves from 未处理 to 处理中 when processing', () => {
|
||
|
|
expect(transitionAlertStatus('未处理', 'process')).toBe('处理中')
|
||
|
|
})
|
||
|
|
|
||
|
|
it('moves to 已关闭 when closing', () => {
|
||
|
|
expect(transitionAlertStatus('处理中', 'close')).toBe('已关闭')
|
||
|
|
})
|
||
|
|
|
||
|
|
it('keeps 已关闭 status', () => {
|
||
|
|
expect(transitionAlertStatus('已关闭', 'process')).toBe('已关闭')
|
||
|
|
})
|
||
|
|
})
|