github / github/codespaces-preact

Use `mount` rendering in tests

Aperta
#5 0 commenti 3 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
83
Fork
64
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
testing-qa
Tipo di issue
Refactoring
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.