github / github/codespaces-preact

Use `mount` rendering in tests

Offen
#5 0 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
83
Forks
64
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
testing-qa
Issue-Typ
Refactoring
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.