googlemaps / googlemaps/react-wrapper

How to mock <Wrapper /> ?

Aperta
#656 5 commenti 4 reazioni 1 assegnatario Rivendicata da @wangela Vedi su GitHub
type: question
Lingua principale
TypeScript
Stelle
381
Fork
50
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.