From 2cd20c3348dc445e444e8ff1a4026775a8ef1501 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Wed, 24 Jan 2024 20:05:35 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E4=BF=AE=E5=A4=8D=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lifecycle/page-lifecycle/page-lifecycle.test.js | 2 +- .../reactivity/watch-sync-effect/watch-sync-effect.test.js | 2 +- pages/lifecycle/page/page.test.js | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pages/composition-api/lifecycle/page-lifecycle/page-lifecycle.test.js b/pages/composition-api/lifecycle/page-lifecycle/page-lifecycle.test.js index d3dfd6b..7f96ee6 100644 --- a/pages/composition-api/lifecycle/page-lifecycle/page-lifecycle.test.js +++ b/pages/composition-api/lifecycle/page-lifecycle/page-lifecycle.test.js @@ -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 diff --git a/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js b/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js index 564f4de..1a969c4 100644 --- a/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js +++ b/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js @@ -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') diff --git a/pages/lifecycle/page/page.test.js b/pages/lifecycle/page/page.test.js index 5bfc501..9fe333e 100644 --- a/pages/lifecycle/page/page.test.js +++ b/pages/lifecycle/page/page.test.js @@ -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 -- GitLab