Skip to content

Return the component from render #3

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
EmilTholin opened this issue May 3, 2019 · 1 comment · Fixed by #4
Closed

Return the component from render #3

EmilTholin opened this issue May 3, 2019 · 1 comment · Fixed by #4
Labels

Comments

@EmilTholin
Copy link
Contributor

It might be beneficial to return rendered from the render function. It's a very pleasent testing experience to $set props (or use getters and setters when compiled with accessors: true) on the component in order to test that it is working properly.

What do you think?

export const render = (Component, options) => {
  // ...

  return {
+   component: rendered,
    ...getQueriesForElement(document.body),
  }
}
@benmonro
Copy link
Member

benmonro commented May 3, 2019

🎉 This issue has been resolved in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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