googlemaps / googlemaps/react-wrapper

How to mock <Wrapper /> ?

Aberta
#656 5 comentários 4 reações 1 responsável Reivindicada por @wangela Ver no GitHub
type: question
Linguagem predominante
TypeScript
Estrelas
381
Forks
50
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Hey,

I am completely lost on unit testing using Jest.

Basically, does anyone know how to mock in order to render child component in unit tests?

```
const MyApp = () => (



);
```

The thing is, always have Status of loading, and it never goes to Success, so the child component is never rendered. Is there a way to mock that Status to Success?

I'm using jest, and react-testing-library.

Thank you.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

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