github / github/codespaces-preact

Use `mount` rendering in tests

Aberta
#5 0 comentários 3 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
83
Forks
64
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Nenhum arquivo ou caminho de teste é especificado. Localize os testes de template que atualmente usam shallow rendering, revise como esses testes estão estruturados e identifique os casos cobertos pela alteração solicitada. O trabalho estará concluído quando os testes relevantes usarem mount rendering e a suíte de testes passar.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
javascript
Domínio
testing-qa
Tipo de issue
Refatoração
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.