github / github/codespaces-preact

Use `mount` rendering in tests

未關閉
#5 0 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
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.

貢獻指南

開啟貢獻指南

研究方向

未指定檔案或測試路徑。找出目前使用 shallow rendering 的範本測試,檢視這些測試的結構,並確認要求的變更涵蓋的案例。相關測試使用 mount rendering 且測試套件通過,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
testing-qa
Issue 類型
重構
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。