Skip to content

Generate appropriate prop definitions for functional SFCs #22

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

Merged
merged 2 commits into from
Nov 2, 2017

Conversation

agualis
Copy link
Contributor

@agualis agualis commented Nov 2, 2017

The previous solution caused problems when a functional SFC was used inside a parent component.
The problem is fixed as you can see in test FunctionalSFCParent.spec

And now you can test functional props with propsData like any other common component as seen in FunctionalSFC.spec.js:
const wrapper = shallow(FunctionalSFC, { propsData: { msg: 'Hello' } })

@eddyerburgh eddyerburgh merged commit 2546761 into vuejs:master Nov 2, 2017
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.

2 participants