enzymejs/enzyme

Render throttling

Open

#1,418 建立於 2017年12月7日

在 GitHub 查看
 (6 留言) (0 反應) (0 負責人)JavaScript (19,979 star) (2,016 fork)batch import
help wanted

描述

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?

貢獻者指南