testing-library / vue-testing-library

🦎 Simple and complete Vue.js testing utilities that encourage good testing practices.
http://testing-library.com/vue
MIT License
1.08k stars 110 forks source link

test: remove await from userEvent usage #182

Closed nickserv closed 3 years ago

nickserv commented 3 years ago

userEvent is entirely synchronous (except for type's delay option which isn't used), so we should use it without await and encourage users to do the same.

afontcu commented 3 years ago

The checkbox group test fails if called synchronously :(

nickserv commented 3 years ago

What should we be using, Vue.nextTick(), flushPromises(), or waitFor()?

afontcu commented 3 years ago

What should we be using, Vue.nextTick(), flushPromises(), or waitFor()?

To keep it relevant to Testing Library users… I'd say waitFor? All these options would do the trick, though.

codecov[bot] commented 3 years ago

Codecov Report

Merging #182 (9c565ef) into master (3dbb1c2) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #182   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          100       100           
  Branches        35        35           
=========================================
  Hits           100       100           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3dbb1c2...9c565ef. Read the comment docs.

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 5.6.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 6.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: