github / github/codespaces-preact

Use `mount` rendering in tests

Đang mở
#5 0 bình luận 3 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
83
Fork
64
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
testing-qa
Loại issue
Tái cấu trúc
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.