googlemaps / googlemaps/react-wrapper

How to mock <Wrapper /> ?

Đang mở
#656 5 bình luận 4 reaction 1 người được giao Được @wangela nhận Xem trên GitHub
type: question
Ngôn ngữ chính
TypeScript
Star
381
Fork
50
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.