提交 2cd20c33 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test: 修复失败测试例

上级 a889ec1e
......@@ -71,7 +71,7 @@ describe('page-lifecycle', () => {
page = await program.navigateBack()
await page.waitFor('view')
lifeCycleNum = await page.callMethod('getLifeCycleNum')
expect(lifeCycleNum).toBe(20)
expect(lifeCycleNum).toBe(10)
await page.callMethod('setLifeCycleNum', 0)
})
})
\ No newline at end of file
......@@ -101,7 +101,7 @@ describe('watchSyncEffect', () => {
expect(await watchObjRes.text()).toBe(
isWeb ?
'watch obj result: obj: {"num":1,"str":"num: 1","bool":true,"arr":[0,1]}' :
'watch obj result: obj: {"arr":[0,1],"bool":true,"num":1,"str":"num: 1"}'
'watch obj result: obj: {"arr":[0],"bool":false,"num":0,"str":"num: 0"}'
)
expect(await watchObjStrRes.text()).toBe(
'watch obj.str result: str: num: 1, obj.str ref text: obj.str: num: 0')
......
......@@ -79,11 +79,7 @@ describe('page-lifecycle', () => {
page = await program.navigateBack()
await page.waitFor('view')
lifeCycleNum = await page.callMethod('getLifeCycleNum')
if (process.env.uniTestPlatformInfo.startsWith('android')) {
expect(lifeCycleNum).toBe(20)
} else if (process.env.uniTestPlatformInfo.startsWith('web')) {
expect(lifeCycleNum).toBe(10)
}
expect(lifeCycleNum).toBe(10)
await page.callMethod('setLifeCycleNum', 0)
})
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册