callstack / callstack/react-native-testing-library

RFC: RNTL Cookbook

Aberta
#1,624 11 comentários 16 reações 0 responsáveis Ver no GitHub
discussion good first issue help wanted
Linguagem predominante
TypeScript
Estrelas
3.4k
Forks
281
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

## RNTL Cookbook

RNTL is feature-complete, so the next big frontier is documenting and sharing best practices so our users can get the most out of using RNTL. Specifically, we could have a significant impact by:
* Describe best practices around common tasks like async tests, network calls,
* Provide ready-made recipes for testing popular libraries like state management, React Navigation
* Provide copy-pastable information about mocking and RNTL setup

I propose creating an RNTL Cookbook. It would be a documentation section where we would gather relatively short "recipes" for handling different concerns, tips & tricks, etc.

### Proposed topics

#### Basic
- [ ] Jest Config
- [x] Custom Render functions #1622
- [x] Testing async code
- [ ] Mocking in general
- [x] Mocking network calls with `fetch`
- [ ] Mocking React Native parts

#### Popular libraries
- [ ] Gesture Handler
- [ ] Reanimated
- [ ] ...

#### Navigation
- [ ] React Navigation
- [ ] Expo Router (?)

#### State management
- [ ] Redux (classic)
- [ ] Redux (RTK)
- [ ] Zustand
- [x] Jotai
- [ ] Valtio
- [ ] ...

#### Other
- [ ] Custom component snapshot matcher (?)
- [ ] Testing Event Emitters / Streams

Each documentation page should be brief and accompanied by an easy-to-understand example showcasing the essence of the recipe/technique. Additionally, I will create an `examples/cookbook` app based on a `basic` example app that will provide runnable code for all recipes.

We would invite our users to share their own best practices, tips & tricks, etc. so this becomes a crowdsource effort and a common knowledge base making our (developer) lives easier and more productive.

CC: @thymikee @pierrezimmermannbam @MattAgn @AugustinLF

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece revisando os tópicos propostos para o cookbook e os exemplos/aplicativo do cookbook planejados com base no aplicativo de exemplo básico. A tarefa estará concluída quando as receitas selecionadas tiverem uma documentação breve e compreensível, com exemplos e cobertura executável no aplicativo do cookbook.

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

Avaliação

Stack de tecnologia
react-native, typescript
Domínio
documentation, mobile-dev, testing
Tipo de issue
Documentação
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

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