From: 三咲智子 Kevin Deng Date: Wed, 1 Feb 2023 07:59:50 +0000 (+0800) Subject: test: fix await patch prop case (#7600) X-Git-Tag: v3.2.46~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=734b06a1241c9ffaeff9db5f9044565f31a6e441;p=thirdparty%2Fvuejs%2Fcore.git test: fix await patch prop case (#7600) --- diff --git a/packages/runtime-dom/__tests__/patchEvents.spec.ts b/packages/runtime-dom/__tests__/patchEvents.spec.ts index 044f385ba1..a207331ad5 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() })