You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated in the docs userEvent.type always returns a promise but you only need to await it if you're using the delay option. Is it sensible to still change the typescript type to always be Promise in this case? I'm asking because I'm working in a vue app and even though I don't use the delay option I actually need to await the result because vue will not have applied the changes otherwise. However, when I put await in front of userEvent.type I get a warning that await won't have an effect here (even though it does).
Is that too vue specific or something that you'd be willing to change when I submit a PR?
The text was updated successfully, but these errors were encountered:
Unfortunately solving this issue for just Vue in isolation would be tricky, as there's no way to tell TypeScript/ESLint/etc that a User Event function is async when used with Vue but not otherwise.
While this is a valid issue the solution would already be covered by #504 so I'll close it as a duplicate.
As stated in the docs
userEvent.type
always returns a promise but you only need toawait
it if you're using thedelay
option. Is it sensible to still change the typescript type to always bePromise
in this case? I'm asking because I'm working in avue
app and even though I don't use thedelay
option I actually need toawait
the result becausevue
will not have applied the changes otherwise. However, when I putawait
in front ofuserEvent.type
I get a warning thatawait
won't have an effect here (even though it does).Is that too
vue
specific or something that you'd be willing to change when I submit a PR?The text was updated successfully, but these errors were encountered: