enzymejs/enzyme

Render throttling

Open

#1,418 创建于 2017年12月7日

在 GitHub 查看
 (6 评论) (0 反应) (0 负责人)JavaScript (2,016 fork)batch import
help wanted

仓库指标

Star
 (19,979 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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?

贡献者指南