Skip to content

Commit 38ad28f

Browse files
committed
Add async events explanation
1 parent d1be195 commit 38ad28f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/vue-testing-library.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ function cleanupAtWrapper(wrapper) {
9292
}
9393

9494
// Vue Testing Library's version of fireEvent will call DOM Testing Library's
95-
// version of fireEvent plus wait for one tick of the event loop so that...
95+
// version of fireEvent plus wait for one tick of the event loop to allow Vue
96+
// to asynchronously handle the event.
97+
// More info: https://vuejs.org/v2/guide/reactivity.html#Async-Update-Queue
9698
async function fireEvent(...args) {
9799
dtlFireEvent(...args)
98100
await wait()

0 commit comments

Comments
 (0)