updateProps dos not exist
davidnixon opened this issue · 2 comments
Describe the bug A clear and concise description of what the bug is.
https://testing-library.com/docs/vue-testing-library/api#updatepropsprops
Does not exist
To Reproduce Steps to reproduce the behavior:
const result = render(MyComponent, { props });
console.log(result.updateProps) // undefined
Expected behavior A clear and concise description of what you expected to
happen.
updateProps
is not defined but rerender
is defined and works as expected according to the react docs https://testing-library.com/docs/react-testing-library/api/#rerender
I think updateProps
should be removed from the vue section and replaced with something similar to the react doc.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Fedora 36
- Browser chrome
- Version 104.0.5112.79 (Official Build) (64-bit)
Additional context Add any other context about the problem here.
package.json
"@testing-library/dom": "^8.13.0",
"@testing-library/user-event": "^14.2.0",
"@testing-library/vue": "^6",
Hi and thanks for reporting the issue!
As you mention, the actual method in v6 (for Vue 3) is rerender
, aligned with other testing library methods (source).
I think updateProps should be removed from the vue section and replaced with something similar to the react doc.
Agree – docs are still talking about the v5 version of vue testing library, which works for Vue 2 (for instance they talk about the callback configuration function, which is no longer available). They need an update – fancy to work on it? It'd be greatly appreciated 😉