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

fix: vm should be the vm of the tested component #64

Merged
merged 1 commit into from
Apr 14, 2020

Conversation

cexbrayat
Copy link
Member

It currently returns the vm of the parent element.
With this commit, it now returns the vm of the tested element.

The test showcases the correct behavior: you can reproduce the issue by adding the test to the master banch. It will fail as it returns the vm of the parent which has no msg, isEnabled fields and toggle function.

@dobromir-hristov
Copy link
Contributor

Yep I think I fixed this one in the find branch. Good catch.

tests/vm.spec.ts Outdated
setup() {
const msg = 'hello'
const isEnabled = ref(true)
const toggle = () => (isEnabled.value = !isEnabled.value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toggle is not necessary here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Removed (it was a leftover of a more in-depth test for #64 )

@lmiller1990 lmiller1990 merged commit 62aca6d into vuejs:master Apr 14, 2020
@lmiller1990
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants