enzymejs/enzyme

Render throttling

Open

#1.418 aberto em 7 de dez. de 2017

Ver no GitHub
 (6 comments) (0 reactions) (0 assignees)JavaScript (2.016 forks)batch import
help wanted

Métricas do repositório

Stars
 (19.979 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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?

Guia do colaborador