From 34c7151e5cb21020e471fd7c89b7de8479c0660e Mon Sep 17 00:00:00 2001 From: wangjinxin613 <1749574663@qq.com> Date: Thu, 25 Jan 2024 14:35:32 +0800 Subject: [PATCH] =?UTF-8?q?test(watch-sync-effect)=EF=BC=9A=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E7=A4=BA=E4=BE=8B=E5=85=BC=E5=AE=B9=20safari?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reactivity/watch-sync-effect/watch-sync-effect.test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 1a969c4..a72e32a 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 @@ -1,6 +1,7 @@ const PAGE_PATH = '/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect' -describe('watchSyncEffect', () => { +describe('watchSyncEffect', () => { + const isSafari = process.env.uniTestPlatformInfo.indexOf('safari') > -1 const isWeb = process.env.uniTestPlatformInfo.startsWith('web') let page = null beforeAll(async () => { @@ -76,7 +77,7 @@ describe('watchSyncEffect', () => { const objBool = await page.$('#obj-bool') expect(await objBool.text()).toBe('obj.bool: false') const objArr = await page.$('#obj-arr') - expect(await objArr.text()).toBe('obj.arr: [0]') + expect(await objArr.text()).toBe(isSafari ? 'obj.arr: [ 0]' : 'obj.arr: [0]') const watchObjRes = await page.$('#watch-obj-res') expect(await watchObjRes.text()).toBe( @@ -96,7 +97,7 @@ describe('watchSyncEffect', () => { expect(await objStr.text()).toBe('obj.str: num: 1') expect(await objNum.text()).toBe('obj.num: 1') expect(await objBool.text()).toBe('obj.bool: true') - expect(await objArr.text()).toBe('obj.arr: [0,1]') + expect(await objArr.text()).toBe(isSafari ? 'obj.arr: [ 0, 1]' : 'obj.arr: [0,1]') expect(await watchObjRes.text()).toBe( isWeb ? -- GitLab