github / github/codespaces-preact
Use `mount` rendering in tests
- 主要语言
- JavaScript
- 星标
- 83
- 派生
- 64
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
调研方向
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.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- testing-qa
- Issue 类型
- 重构
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100