优化
This commit is contained in:
@@ -11,6 +11,16 @@ import {
|
||||
import { session } from '../src/stores/session.js'
|
||||
import { toDispatchError } from '../src/utils/dispatch-error.js'
|
||||
|
||||
test('dispatch network failures show recovery guidance and retain diagnostics', () => {
|
||||
const error = toDispatchError({ message: 'request:fail', network: true, code: 'NETWORK_ERROR', requestId: 'network-request', traceId: 'network-trace' })
|
||||
assert.equal(error.message, '网络连接失败,请检查网络后重试,当前作业已保留')
|
||||
assert.equal(error.network, true)
|
||||
assert.equal(error.code, 'NETWORK_ERROR')
|
||||
assert.equal(error.requestId, 'network-request')
|
||||
assert.equal(error.traceId, 'network-trace')
|
||||
assert.equal(toDispatchError({ message: '业务校验失败' }).message, '业务校验失败')
|
||||
})
|
||||
|
||||
const read = (path) => readFile(new URL(path, import.meta.url), 'utf8')
|
||||
|
||||
test('dispatch merge retains return carton picking and review gates together', async () => {
|
||||
|
||||
Reference in New Issue
Block a user