github / github/codespaces-preact
Use `mount` rendering in tests
- Lenguaje dominante
- JavaScript
- Estrellas
- 83
- Forks
- 64
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hello,
As a maintainer of the Enzyme adapter for Preact, I would strongly recommend that new code should using the `mount` ("full DOM rendering") rather than the `shallow` rendering mode as this template currently does. I wrote a [blog post](https://robertknight.me.uk/posts/shallow-rendering-revisited/) a while back which explains the rationale in detail and alternative ways to achieve the same results. In brief the main reasons are that shallow rendering tends to lead to brittle tests which are a pain to maintain, and the approach has fallen out of favor in the ecosystem, so there are less resources available related to it.
If I can find time to submit a PR I will do so, but otherwise I'd welcome someone else to make the change.
Guía de contribución
Línea de trabajo
No file or test path is named. Locate the template tests that currently use shallow rendering, review how those tests are structured, and identify the cases covered by the requested change. Done means the relevant tests use mount rendering and the test suite passes.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- testing-qa
- Tipo de issue
- Refactorización
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100