From 734b06a1241c9ffaeff9db5f9044565f31a6e441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Wed, 1 Feb 2023 15:59:50 +0800 Subject: [PATCH] test: fix await patch prop case (#7600) --- packages/runtime-dom/__tests__/patchEvents.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/runtime-dom/__tests__/patchEvents.spec.ts b/packages/runtime-dom/__tests__/patchEvents.spec.ts index 044f385ba17..a207331ad56 100644 --- a/packages/runtime-dom/__tests__/patchEvents.spec.ts +++ b/packages/runtime-dom/__tests__/patchEvents.spec.ts @@ -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() })