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

Test Suite breaking! #461

Closed
Talha345 opened this issue Aug 11, 2023 · 1 comment
Closed

Test Suite breaking! #461

Talha345 opened this issue Aug 11, 2023 · 1 comment

Comments

@Talha345
Copy link

Using import {URL} from 'react-native-url-polyfill'; breaks Jest Test suite with the error TypeError: Cannot read properties of undefined (reading 'Version')

Stack Trace:
 at Object.<anonymous> (node_modules/react-native-url-polyfill/js/ios10Fix.js:2:54)
 at Object.<anonymous> (node_modules/react-native-url-polyfill/index.js:9:1)
@Talha345
Copy link
Author

Was happening because of loading the module in test suite before mocking.

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

No branches or pull requests

1 participant