googlemaps / googlemaps/react-wrapper

How to mock <Wrapper /> ?

Open
#656 5 comments 4 reactions 1 assignee Claimed by @wangela View on GitHub
type: question
Dominant language
TypeScript
Stars
381
Forks
50
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.