Open
Description
I'll use this issue to keep track of all efforts to support Vue 3 in the next major version of Vue Testing Library.
All feedback is appreciated! 🚀
Support for Vue 3 is released in next
channel:
https://github.com/testing-library/vue-testing-library/tree/next
Install it by running npm install --save-dev @testing-library/vue@next
.
To do:
- Update types: feat: Add types for Vue 3 #180
- Add suport/example for vue-apollo: docs: Add example for Apollo GraphQL + composition API #192
- Handle Vue Router: feat: Reenable Vue Router for Vue 3 #191
- ...properly: VTL for Vue 3: The routes option does not work correctly #195. RFC: [RFC] Remove custom router/vuex management for Vue 3 #205
- Rethink rerender/setProps: Vue 3: about rerender api design #198 (for now, it stays as it is, because it matches Testing Library ecosystem expectations).
- Find a way to test async components Vue 3: Async component with suspense wrapper #230
BREAKING CHANGES
- Snapshots are potentially different due to whitespaces.
- Callback function (third parameter of
render
) is now gone. It is replaced withglobal
config options (for example, global.directives). Check all available options in VTU docs. This includes plugins and slots, too. isUnmounted
is gone.updateProps
is now calledrerender
to align with other Testing Lib libraries. For the time being is just an alias to Vue Test Utils' setProps, but we might want to explore further options to actually rerender the component. This is further discussed in Vue 3: about rerender api design #198.
Other breaking changes that are not directly related to Vue 3:
- removed support for node 10.
Please notice that releases on next
branch will remain on the range of 6.x.x, even if they introduce breaking changes.
Metadata
Metadata
Assignees
Labels
No labels