Skip to content
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: Props in child component defined in mixin are missing with shallowMount on @vue/compat #2333

Open
cody-collins opened this issue Feb 9, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@cody-collins
Copy link

cody-collins commented Feb 9, 2024

Describe the bug
With shallowMount on Vue 3 + @vue/compat, properties of a child component are undefined when using them through a mixin.

If the property is moved from the mixin directly to the component, then the property is defined.

Also if the shallowMount is switched to mount, the property is defined.

To Reproduce

I created a demo repo where this issue can be reproduced, with tags for various working and not working states. It includes the following important files:

git clone https://github.com/cody-collins/vue-compat-mixin-demo.git
cd vue-compat-mixin-demo
npm install
npm test

And the following tags:

Expected behavior
The second assertion should pass in the broken case

@cody-collins cody-collins added the bug Something isn't working label Feb 9, 2024
@cexbrayat
Copy link
Member

Hi @cody-collins

Thanks for the repros. compat mode is the realm of @xanf , so let's ping him

@lmiller1990
Copy link
Member

I do not doubt this is a bug, but I suspect fixing this will be quite complex. It may be a good time to attempt to move your test to use mount, which is a lot less complexity and more in parity with both Test Utils v1 and production in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants