优化
This commit is contained in:
@@ -5,10 +5,11 @@ import { readFile } from 'node:fs/promises'
|
||||
const read = (path) => readFile(new URL(path, import.meta.url), 'utf8')
|
||||
|
||||
test('remote PDA mutations use the shared online gate', async () => {
|
||||
const [api, network, page] = await Promise.all([
|
||||
read('../api/pda-loading.js'), read('../utils/network.js'), read('../pages/picking/picking.vue')
|
||||
const [api, http, network, page] = await Promise.all([
|
||||
read('../api/pda-loading.js'), read('../api/http.js'), read('../utils/network.js'), read('../pages/picking/picking.vue')
|
||||
])
|
||||
assert.match(api, /function request\(options\) \{[\s\S]*?requireOnline\(\)/)
|
||||
assert.match(api, /const request = apiRequest/)
|
||||
assert.match(http, /async function runAuthenticated\(execute\) \{[\s\S]*?requireOnline\(\)/)
|
||||
assert.match(api, /uploadEvidenceFile[\s\S]*?requireOnline\('当前网络不可用,无法上传装柜照片'\)/)
|
||||
assert.match(network, /uni\.onNetworkStatusChange/)
|
||||
assert.match(network, /result\.networkType !== 'none'/)
|
||||
|
||||
Reference in New Issue
Block a user