Преглед на файлове

test: fix await patch prop case (#7600)

三咲智子 Kevin Deng преди 3 години
родител
ревизия
734b06a124
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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()
       childFn()
       patchProp(el, 'onClick', null, parentFn)
       patchProp(el, 'onClick', null, parentFn)
     })
     })
-    child.dispatchEvent(new Event('click', { bubbles: true }))
 
 
     await timeout()
     await timeout()
+    child.dispatchEvent(new Event('click', { bubbles: true }))
+
     expect(childFn).toHaveBeenCalled()
     expect(childFn).toHaveBeenCalled()
     expect(parentFn).not.toHaveBeenCalled()
     expect(parentFn).not.toHaveBeenCalled()
   })
   })