Skip to content

Prop declared in mixin is not recognized when using shallowMount #1094

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

Closed
lzhoucs opened this issue Jan 12, 2019 · 2 comments · Fixed by #1101
Closed

Prop declared in mixin is not recognized when using shallowMount #1094

lzhoucs opened this issue Jan 12, 2019 · 2 comments · Fixed by #1101
Labels

Comments

@lzhoucs
Copy link

lzhoucs commented Jan 12, 2019

When shallowMount a component which passes down a boolean prop to a child component, such prop is SOMETIMES undefined. mount works as expected. Please see my demo repo tests for details.

Version

1.0.0-beta.28

Reproduction link

https://github.com/lzhoucs/vue-test-utils-bugreport/tree/1094-shallowMount-boolean-prop-issue

Steps to reproduce

git clone [email protected]:lzhoucs/vue-test-utils-bugreport.git
git checkout 1094-shallowMount-boolean-prop-issue

yarn install
yarn test:unit

What is expected?

All 3 tests pass

What is actually happening?

the one with vuetify's V-Btn fails


Not sure if this is a vuetify issue or vue-test-utils one. Filed it here for now.

@lzhoucs
Copy link
Author

lzhoucs commented Jan 15, 2019

I think this is the same issue as #1096. VBtn's disabled prop is in one of its mixin too.

@eddyerburgh
Copy link
Member

Thanks for investigating further. You're correct, this is the same issue as #1096

@eddyerburgh eddyerburgh changed the title shallowMount does not always work with child component's boolean prop Prop declared in mixin is not recognized when using shallowMount Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants