Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jest): mock return value not resolve value for useNetInfo mock #515

Merged
merged 1 commit into from Nov 3, 2021

Conversation

Grohden
Copy link
Contributor

@Grohden Grohden commented Nov 3, 2021

Overview

Changed the mocked return for the useNetInfo to return direct state instead of promise

Test Plan

  • Right now: see if any breaks..

Fixes #514

Help?

  • This might break someone tests when they update this package.. so its a minor update perhaps?

Copy link
Contributor

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and the tests pass. Thanks!

@mikehardy mikehardy changed the title fix(jest): fix wrong return for useNetInfo fix(jest): mock return value not resolve value for useNetInfo mock Nov 3, 2021
@mikehardy mikehardy merged commit cfde0aa into react-native-netinfo:master Nov 3, 2021
@Grohden Grohden deleted the patch-1 branch November 3, 2021 15:04
github-actions bot pushed a commit that referenced this pull request Nov 3, 2021
## [6.0.5](v6.0.4...v6.0.5) (2021-11-03)

### Bug Fixes

* **jest:** mock return value not resolve value for useNetInfo mock ([#515](#515)) ([cfde0aa](cfde0aa))
@matt-oakes
Copy link
Collaborator

🎉 This PR is included in version 6.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jest] Mock for useNetInfo should return state instead of promise<state>
3 participants