-
Notifications
You must be signed in to change notification settings - Fork 244
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: Stubs broken in vue@3.4.22
#2411
Labels
bug
Something isn't working
Comments
cexbrayat
added a commit
to cexbrayat/vue-test-utils-next
that referenced
this issue
Apr 16, 2024
cexbrayat
added a commit
to cexbrayat/vue-test-utils-next
that referenced
this issue
Apr 16, 2024
Fixes vuejs#2411 We can "trick" the warning introduced in Vue v3.4.22 (See vuejs/core@7ccd453) by using an array of strings instead of a string (as the new check allows functions and arrays, but not strings). This does not affect the rendering of the stub, and still displays `[Function]`, so it should not impact the existing tests.
Thanks @alecgibson for the repro. |
cexbrayat
added a commit
that referenced
this issue
Apr 16, 2024
Fixes #2411 We can "trick" the warning introduced in Vue v3.4.22 (See vuejs/core@7ccd453) by using an array of strings instead of a string (as the new check allows functions and arrays, but not strings). This does not affect the rendering of the stub, and still displays `[Function]`, so it should not impact the existing tests.
Did this get resolved? Upgrading to the latest test utils & I still have an issue, that sounds quite similar. |
The fix has been merged, but not released yet. |
Ah ok perfect 👍 |
nazarepiedady
pushed a commit
to nazarepiedady/vue-test-utils-v2
that referenced
this issue
Jul 18, 2024
Fixes vuejs#2411 We can "trick" the warning introduced in Vue v3.4.22 (See vuejs/core@7ccd453) by using an array of strings instead of a string (as the new check allows functions and arrays, but not strings). This does not affect the rendering of the stub, and still displays `[Function]`, so it should not impact the existing tests.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
vue@3.4.22
added stricter type checking for event handlers, enforcing that they're either aFunction
orFunction[]
, and not astring
.@vue/test-utils
actively sets handlers to thestring
"[Function]"
, resulting in a warning:To Reproduce
https://stackblitz.com/edit/github-tyybbg?file=src%2Fcomponents%2FWelcomeItem.vue
Expected behavior
No warnings.
Related information:
Additional context
The text was updated successfully, but these errors were encountered: