mirror of
https://github.com/yibaiba/hideck.git
synced 2026-12-06 00:01:20 +00:00
12 lines
611 B
TypeScript
12 lines
611 B
TypeScript
import assert from 'node:assert/strict'
|
|
import test from 'node:test'
|
|
import { modemVoicePresentation, modemVoiceStages } from '../src/utils/modemVoicePresentation'
|
|
|
|
test('ADB reboot remains pending rather than failed or ready', () => {
|
|
const state = { ready: false, phase: 'restarting', last_error: '模组重启准备中' }
|
|
assert.equal(modemVoicePresentation(state).tone, 'is-pending')
|
|
assert.match(modemVoicePresentation(state).title, /正在重启/)
|
|
assert.equal(modemVoiceStages(state)[0].ready, undefined)
|
|
assert.equal(modemVoicePresentation({ ...state, phase: 'failed' }).tone, 'is-failed')
|
|
})
|