-
Notifications
You must be signed in to change notification settings - Fork 262
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: TypeError: $setup.mergeProps is not a function #2365
Comments
Can you provide us a small repro online using https://stackblitz.com/github/vuejs/create-vue-templates/tree/main/typescript-vitest?file=src%2Fcomponents%2F__tests__%2FHelloWorld.spec.ts ? It only takes a few minutes, and we'll be able to take a look |
I hsould have made a reproduction before. Then i knew what the issue was. In my test i forgot to provide something, so the throw is called, and then for some reason this error pops up. Which is strange, so i like someone to take a look at it. Perhaps a better error can be thrown. The error that i throw. Here is my reproduction: https://stackblitz.com/edit/github-wnubin Run the tests, and see there is a weird error. When you remove line 5 from the composables/useSomething.ts |
@ricardovanlaarhoven You forgot the link to the repro 😉 |
Lol.. must be a monday.. |
Thanks 👍 I think this is a duplicate of #2319 : the thrown error is hidden and $setup gets all its properties undefined. |
Original: vuejs/vue-test-utils#2091
Subject of the issue
When using vue's mergeprops in a component that's being tested, i'm getting an error
Steps to reproduce
Mount a component that is using
import { mergeProps } from "vue";
Expected behaviour
A working mount
Actual behaviour
TypeError: $setup.mergeProps is not a function
The text was updated successfully, but these errors were encountered: