From 75c852457c1209ef7198ae28b9bb784b9f97c817 Mon Sep 17 00:00:00 2001 From: Travis Date: Mon, 14 Nov 2022 23:07:55 +0800 Subject: [PATCH] test(runtime-dom): avoid dispatchEvent and bindEvent in the same loop --- packages/runtime-dom/__tests__/patchEvents.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/runtime-dom/__tests__/patchEvents.spec.ts b/packages/runtime-dom/__tests__/patchEvents.spec.ts index 32466f29a7b..fa15419e59d 100644 --- a/packages/runtime-dom/__tests__/patchEvents.spec.ts +++ b/packages/runtime-dom/__tests__/patchEvents.spec.ts @@ -160,6 +160,9 @@ describe(`runtime-dom: events patching`, () => { childFn() patchProp(el, 'onClick', null, parentFn) }) + + // avoid dispatchEvent and bindEvent in the same loop + await timeout() child.dispatchEvent(new Event('click', { bubbles: true })) await timeout()