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 failing jest tests with constructor #1131

Closed
wants to merge 2 commits into from

Conversation

cranesandcaff
Copy link

This PR adds a constructor to the Icon react class. This allows Jest unit tests to pass. We had an issue where our unit tests would fail unless we patched this class.

@szholdiyarov
Copy link
Contributor

hey @cranesandcaff

Thanks for your contribution 👍🏼

Could you please give a more detailed explanation of the issue you had with running your unit tests? Did you try to mock that file?

@cranesandcaff
Copy link
Author

GeekyAnts/NativeBase#2657
#1046
https://stackoverflow.com/questions/55530292/cannot-read-property-default-of-undefined-while-testing-application-with-jest

We could mock the icon but this will fix it for many people and save a lot of mental energy around using the project with no downsides.

@cranesandcaff
Copy link
Author

Any thoughts on this? Seems like a low or no risk & high reward merge..

@hoblin
Copy link

hoblin commented Mar 24, 2020

That's another way to fix these fails #1157

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

Successfully merging this pull request may close these issues.

3 participants