From a9bbe02f6f589dc2220481eb182182566c6d5924 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Wed, 24 Jan 2024 15:46:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= =?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 --- .../reactivity/watch-sync-effect/watch-sync-effect.test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 772f669..bb6f28f 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 @@ -99,7 +99,10 @@ describe('watchSyncEffect', () => { expect(await objArr.text()).toBe(isWeb ? 'obj.arr: [\n0,\n1\n]' : 'obj.arr: [0,1]') expect(await watchObjRes.text()).toBe( - 'watch obj result: obj: {"arr":[0],"bool":false,"num":0,"str":"num: 0"}') + 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"}' + ) expect(await watchObjStrRes.text()).toBe( 'watch obj.str result: str: num: 1, obj.str ref text: obj.str: num: 0') expect(await watchObjArrRes.text()).toBe('watch obj.arr result: arr: [0,1]') -- GitLab