test(phase-5.1): 分片/教程接线的测试缝与棘轮台账随实现对齐
- upload.ts 保持 axios 实例 http.post(与打包产物一致),两处用例改对撞同一把缝 - 教程确认用例接受可选 file_key,并新增该参数的存在断言 - 静默 catch 台账登记 localStorage 两处,blocks 抬到 307 并逐支说明
This commit is contained in:
@@ -49,7 +49,7 @@ test('test_reexport_upload_helpers', async (t) => {
|
||||
location: { origin: 'http://localhost' },
|
||||
}
|
||||
const calls: { url?: string; method?: string; data?: unknown }[] = []
|
||||
t.mock.method(http, 'post', ((url: string, data?: unknown, config?: unknown) => {
|
||||
t.mock.method(http, 'post', ((url: string, data?: unknown) => {
|
||||
calls.push({ url, method: 'POST', data })
|
||||
return Promise.resolve({ data: { success: true, message: 'ok', data: { fileKey: 'f1', originalFilename: 'a.xlsx', localPath: '/tmp/a.xlsx', size: 1 } } })
|
||||
}) as never)
|
||||
|
||||
Reference in New Issue
Block a user