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): addEventListener mock returns a function to match API #529

Merged
merged 1 commit into from Nov 17, 2021

Conversation

vishalnarkhede
Copy link
Contributor

Overview

NetInfo.addEventListener() returns unsubscribe function from actual api, but corresponding jest mock returns nothing. Jest mock should also return a mocked function.

Test plan

Dependent on existing test suite

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.

@mikehardy mikehardy changed the title fix(jest): update addEventListener jest mock to return unsubscribe fu… fix(jest, mock): addEventListener mock returns a function to match API Nov 17, 2021
@mikehardy mikehardy merged commit 82ca2ad into react-native-netinfo:master Nov 17, 2021
github-actions bot pushed a commit that referenced this pull request Nov 17, 2021
## [7.1.2](v7.1.1...v7.1.2) (2021-11-17)

### Bug Fixes

* **jest, mock:** addEventListener returns a function to match API ([#529](#529)) ([82ca2ad](82ca2ad))
@matt-oakes
Copy link
Collaborator

🎉 This PR is included in version 7.1.2 🎉

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.

None yet

3 participants