github / github/codespaces-preact
Use `mount` rendering in tests
- Dominant language
- JavaScript
- Stars
- 83
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.