diff --git a/pages/composition-api/reactivity/watch/watch.test.js b/pages/composition-api/reactivity/watch/watch.test.js index 751d3178c6e85bdf9c92ab949e84406359ab627e..b4c3aaba32499260e9b3892e6c6e8f26bc7757c5 100644 --- a/pages/composition-api/reactivity/watch/watch.test.js +++ b/pages/composition-api/reactivity/watch/watch.test.js @@ -1,6 +1,7 @@ const PAGE_PATH = '/pages/composition-api/reactivity/watch/watch' -describe('watch', () => { +describe('watch', () => { + const isSafari = process.env.uniTestPlatformInfo.indexOf('safari') > -1 let page = null beforeAll(async () => { page = await program.reLaunch(PAGE_PATH) @@ -81,7 +82,7 @@ describe('watch', () => { 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') if (process.env.uniTestPlatformInfo.startsWith('android')) { @@ -107,7 +108,7 @@ describe('watch', () => { 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]') if (process.env.uniTestPlatformInfo.startsWith('android')) { expect(await watchObjRes.text()).toBe(