googlemaps / googlemaps/react-wrapper

How to mock <Wrapper /> ?

Abierto
#656 5 comentarios 4 reacciones 1 asignado Reclamado por @wangela Ver en GitHub
type: question
Lenguaje dominante
TypeScript
Estrellas
381
Forks
50
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.