enzymejs/enzyme

Render throttling

Open

#1418 opened on Dec 7, 2017

View on GitHub
 (6 comments) (0 reactions) (0 assignees)JavaScript (19,979 stars) (2,016 forks)batch import
help wanted

Description

Nowadays more and more people start using enzyme for integration tests, abandoning the lands of Webdriver. Enzyme is a great thing for unit tests, but not the perfect for the integration ones.

And that's why: React throttles setState, applying the changes on next tick. React doing the same for render materializing VDom not instantly. As result, if on componentWillMount you will dispatch redux event, you will get the old store during the render.

Current synchronius model is ideal for units tests, but is it possible to make enzyme behaviour more React-ish? Add some debounce to make it more async, and more real?

Contributor guide