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
When I mount a component using await mountSuspended() and call wrapper.props(), an empty object is returned.
This is probably caused by the wrapping <Suspense> component. I also had no success trying to get the original mounted component first, e.g. using wrapper.findComponent(MyComponent), but that returns null. I would expect it to return the component instead.
sebbayer
changed the title
wrapper.props() and findComponent() not working with mountSuspended
wrapper.props() and wrapper.findComponent() not working with mountSuspended
Jan 10, 2025
sebbayer
changed the title
wrapper.props() and wrapper.findComponent() not working with mountSuspended
wrapper.props() not working with mountSuspended
Jan 10, 2025
Environment
Reproduction
https://stackblitz.com/edit/nuxt-starter-fhhew7bp?file=pages%2F__tests__%2FTestComponent.nuxt.spec.js
Describe the bug
When I mount a component using
await mountSuspended()
and callwrapper.props()
, an empty object is returned.This is probably caused by the wrapping
<Suspense>
component. I also had no success trying to get the original mounted component first, e.g. usingwrapper.findComponent(MyComponent)
, but that returnsnull
. I would expect it to return the component instead.See https://test-utils.vuejs.org/api/#props-1
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: