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

Virtual DOM DeepRenderer? #7019

Closed
lasekio opened this issue Jun 11, 2016 · 2 comments
Closed

Virtual DOM DeepRenderer? #7019

lasekio opened this issue Jun 11, 2016 · 2 comments

Comments

@lasekio
Copy link
Contributor

lasekio commented Jun 11, 2016

Virtual DOM has a lot of potential in testing. But actually only ShallowRenderer uses it in 100%, which is great. But it's only usable for unit testing. Library like Enzyme are great in deep rendering w/o real DOM, which is huge performance boost in case of functional (or/and integration) testing without real browser. But it uses DOM mock, which is called jsdom.

In my opinion it is totally unnecessary, because VirtualDOM rendered output is totally usable for testing (which ShallowRenderer proves).

So I made little hacky but fully working patch to ShallowRenderer, which allows to render children also (PR here).

So my propose is introduce something like DeepRenderer in test utils. I can modify my patch.

Is it worth to skip jsdom? Will it be noticable perf boost? How to name that renderer? How the API should look like?

@gaearon
Copy link
Collaborator

gaearon commented Jun 11, 2016

I think this has been added in #6944, and while the exact API is subject to change, you might want to track what happens to it in a few weeks! I’ll close because it already exists and will be out soon.

@gaearon gaearon closed this as completed Jun 11, 2016
@lasekio
Copy link
Contributor Author

lasekio commented Jun 11, 2016

Lol, this is exactly what I was talking about. Gj @spicyj

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

No branches or pull requests

2 participants