test: fix await patch prop case (#7600)

This commit is contained in:
三咲智子 Kevin Deng 2023-02-01 15:59:50 +08:00 committed by GitHub
parent 957722c418
commit 734b06a124
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -160,9 +160,10 @@ describe(`runtime-dom: events patching`, () => {
childFn()
patchProp(el, 'onClick', null, parentFn)
})
child.dispatchEvent(new Event('click', { bubbles: true }))
await timeout()
child.dispatchEvent(new Event('click', { bubbles: true }))
expect(childFn).toHaveBeenCalled()
expect(parentFn).not.toHaveBeenCalled()
})