Skip to content

Process functional single file components #17

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 1 commit into from
Oct 23, 2017
Merged

Process functional single file components #17

merged 1 commit into from
Oct 23, 2017

Conversation

agualis
Copy link
Contributor

@agualis agualis commented Oct 23, 2017

Vue supports Pure Functional templates from version 2.5:
https://vue-loader.vuejs.org/en/features/functional.html

With this pull request jest-vue would allow them to be tested.

  • Note that we need to nest props attribute in propsData like this:
const wrapper = shallow(FunctionalSFC, {
    propsData: { props: { msg: 'Hello' }}
 })

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