提交 c131d222 编写于 作者: 雪洛's avatar 雪洛

test: 修复测试例错误

上级 5e81cd1e
......@@ -21,14 +21,14 @@ describe('unicloud-import-object', () => {
returnTodoTitle,
returnTodoContent,
failErrCode,
failWithNumberErrCode,
failNumberErrCode,
successErrCode,
} = await page.data()
expect(returnTodoTitle).toBe(todoTitle)
expect(returnTodoContent).toBe(todoContent)
expect(failErrCode).toBe('TEST_ERROR_CODE')
expect(failWithNumberErrCode).toBe(-1)
expect(failNumberErrCode).toBe(-1)
expect(successErrCode).toBe(0)
})
......
......@@ -37,7 +37,7 @@
returnTodoTitle: '',
returnTodoContent: '',
failErrCode: '',
failWithNumberErrCode: 0,
failNumberErrCode: 0,
successErrCode: -1,
isUniTest: false
}
......@@ -117,7 +117,7 @@
console.log('todo.fail: ', res);
}).catch((err : any | null) => {
const error = err as UniCloudError
this.failWithNumberErrCode = error.errCode as number
this.failNumberErrCode = error.errCode as number
console.error(error)
if (this.isUniTest) {
uni.showToast({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册