Sfoglia il codice sorgente

test: fix await patch prop case (#7600)

三咲智子 Kevin Deng 3 anni fa
parent
commit
734b06a124
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      packages/runtime-dom/__tests__/patchEvents.spec.ts

+ 2 - 1
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()
   })