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

test: 修复测试例错误

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