提交 74631323 编写于 作者: F fxy060608

chore: 调整 reactive 测试例

上级 d6e5e0fa
......@@ -48,10 +48,10 @@ describe('reactive', () => {
const updateArr1Btn = await page.$('#update-arr1-btn')
await updateArr1Btn.tap()
expect(await arr1.text()).toBe('[1,2,3]')
expect(await arr1.text()).toBe(JSON.stringify([1, 2, 3]))
const updateArr1ReactiveBtn = await page.$('#update-arr1-reactive-btn')
await updateArr1ReactiveBtn.tap()
expect(await arr1.text()).toBe('[4,5,6]')
expect(await arr1.text()).toBe(JSON.stringify([4, 5, 6]))
})
})
\ No newline at end of file
......@@ -26,7 +26,7 @@
</view>
<view class="flex justify-between flex-row mb-10">
<text>arr1(spread):</text>
<text id="arr1">{{ arr1 }}</text>
<text id="arr1">{{ JSON.stringify(arr1) }}</text>
</view>
<button class='mb-10' id="update-count-btn" @click="updateCount">update count</button>
<button class='mb-10' id="update-obj-str-btn" @click="updateObjStr">update obj.str</button>
......@@ -66,7 +66,7 @@
const obj1 = reactive({
a: { b: { c: 'c' } }
})
} as UTSJSONObject)
const count1 = ref(0)
watchEffect(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册