diff --git a/pages/composition-api/reactivity/watch-effect/watch-effect.test.js b/pages/composition-api/reactivity/watch-effect/watch-effect.test.js index 9e0234460722ac882d2cb308f9a81c98c23c7f98..93abcddf20181bc4ca995073f811944d8290f464 100644 --- a/pages/composition-api/reactivity/watch-effect/watch-effect.test.js +++ b/pages/composition-api/reactivity/watch-effect/watch-effect.test.js @@ -133,7 +133,7 @@ describe('watchEffect', () => { if (process.env.uniTestPlatformInfo.startsWith('android')) { expect(await watchObjRes.text()).toBe( - 'watch obj result: obj: {"arr":[0],"bool":false,"num":0,"str":"num: 0"}') + 'watch obj result: obj: {"arr":[0,1],"bool":true,"num":1,"str":"num: 1"}') } if (process.env.uniTestPlatformInfo.startsWith('web')) { expect(await watchObjRes.text()).toBe( diff --git a/pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js b/pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js index dc7613441c072fff395d6e65825fb2c4425a6282..db152f58fb74c7807087aab359d740baff48765f 100644 --- a/pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js +++ b/pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js @@ -107,8 +107,7 @@ describe('watchPostEffect', () => { const watchObjRes = await page.$('#watch-obj-res') // TODO web端和安卓端JSON.stringify对属性的排序不一致 - if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.startsWith( - 'IOS')) { + if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.toLocaleLowerCase().startsWith('ios')) { expect(await watchObjRes.text()).toBe( 'watch obj result: obj: {"num":0,"str":"num: 0","bool":false,"arr":[0]}' ) @@ -136,14 +135,13 @@ describe('watchPostEffect', () => { expect(await objBool.text()).toBe('obj.bool: true') expect(await objArr.text()).toBe('obj.arr: [0,1]') - if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.startsWith( - 'IOS')) { + if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.toLocaleLowerCase().startsWith('ios')) { expect(await watchObjRes.text()).toBe( 'watch obj result: obj: {"num":1,"str":"num: 1","bool":true,"arr":[0,1]}' ) } else { expect(await watchObjRes.text()).toBe( - 'watch obj result: obj: {"arr":[0],"bool":false,"num":0,"str":"num: 0"}' + 'watch obj result: obj: {"arr":[0,1],"bool":true,"num":1,"str":"num: 1"}' ) } expect(await watchObjStrRes.text()).toBe( 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 3b669085fbeee1f20a29e8b443d81d198d28c947..dc0673cde8aab8de4beaac8b676abe543d9bfd84 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 @@ -106,8 +106,7 @@ describe('watchSyncEffect', () => { expect(await objArr.text()).toBe('obj.arr: [0]') const watchObjRes = await page.$('#watch-obj-res') - if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.startsWith( - 'IOS')) { + if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.toLocaleLowerCase().startsWith('ios')) { expect(await watchObjRes.text()).toBe( 'watch obj result: obj: {"num":0,"str":"num: 0","bool":false,"arr":[0]}' ) @@ -136,14 +135,13 @@ describe('watchSyncEffect', () => { expect(await objBool.text()).toBe('obj.bool: true') expect(await objArr.text()).toBe('obj.arr: [0,1]') - if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.startsWith( - 'IOS')) { + if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.toLocaleLowerCase().startsWith('ios')) { expect(await watchObjRes.text()).toBe( 'watch obj result: obj: {"num":1,"str":"num: 1","bool":true,"arr":[0,1]}' ) } else { expect(await watchObjRes.text()).toBe( - 'watch obj result: obj: {"arr":[0],"bool":false,"num":0,"str":"num: 0"}' + 'watch obj result: obj: {"arr":[0,1],"bool":true,"num":1,"str":"num: 1"}' ) }