Skip to content

Commit

Permalink
test: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Sep 5, 2022
1 parent b3b89bc commit f69119d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/runtime-core/__tests__/helpers/withMemo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,17 @@ describe('v-memo', () => {
// should update
await nextTick()
expect(el.innerHTML).toBe(`<div>3 3</div>`)

vm.ok = true
await nextTick()
vm.ok = false
await nextTick()
expect(el.innerHTML).toBe(`<div>3 3</div>`)

vm.y++
// should update
await nextTick()
expect(el.innerHTML).toBe(`<div>4 3</div>`)
})

test('on v-for', async () => {
Expand Down

0 comments on commit f69119d

Please sign in to comment.