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

Add support for mixed rendering #49

Closed
wants to merge 5 commits into from
Closed

Conversation

Saegrov
Copy link

@Saegrov Saegrov commented Sep 21, 2017

Mixed rendering is a mode that works like shallow rendering, but where
you can specify a list of components you want to render even tho they
are deeply nested.

We have a use case where we are using shallow rendering and Cheerio for unit testing our Preact components. We are using a redux-connect like higher order component to connect some components to our global state.
When testing a component, that uses another component that is wrapped in a HOC, the shallow renderer stops at the HOC.

With mixed rendering we can white list components we want to render and test that the wrapped components are used correctly.

Mixed rendering is a mode that works like shallow rendering, but where
you can specify a list of components you want to render even tho they
are deeply nested.
@Saegrov
Copy link
Author

Saegrov commented Sep 27, 2017

Had to do some commits to use this internally at our company. Closing this in favour of #50

@Saegrov Saegrov closed this Sep 27, 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.

1 participant