-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Transition - [Vue warn]: Wrong type passed as event handler to xxx - did you forget @ or : in front of your prop? #2430
Comments
Hi @wouterkroes Thanks for the repro. The warning is because the built-in transition stub in VTU is really simple and doesn't handle these hooks. You have 3 possible solutions that can be used immediatly:
We could maybe improve the built-in stub. I'm wondering if this code test-utils/src/vnodeTransformers/stubComponentsTransformer.ts Lines 103 to 109 in 9332127
emits as well, and if that would not be enough to solve the issue.Would you like to try to open a PR? That would be a great help and we wold gladly review and merge it. |
Hi @cexbrayat, Thanks for your quick and helpful response. Your first solution worked for me. As for making the built-in stub handle I have created a PR to add some information to the docs, what do you think of it? Thanks once again! |
@wouterkroes Thanks for the PR Before I merge it, I think the warning is gone with the latest VTU release we did today. |
@cexbrayat you are correct, the v2.4.6 indeed fixes it! Perfect timing! And I guess sorry for the duplicate bug report (#2411), that is just mentioned by @alecgibson. |
Yeah I'm the one who fixed it, and I had already forgotten it. Let's close this then! |
Describe the bug
Vue warnings are present in the stderr of Vitest.
These Vue warnings are not present in the Browser.
My guess is VTU is not correctly handling Transition in combination with javascript hooks
To Reproduce
stackblitz demo ->
npm run test:unit
Expected behavior
I expect no vue warnings in the stderr of Vitest
Related information:
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: