Open edmundito opened 7 years ago
Short term that's exactly the ideal fix for this! Long term i plan to do a large refactor job on the project in the coming weeks, i'll add this to the list!
@edmundito would you be able to share how you implemented this?
@joelpickup In whichever test framework you're using in the initialization JS file, or via an import in your test, you can add the following:
const React = require('react-native');
React.I18nManager = {
isRTL: false,
allowRTL: () => {},
forceRTL: () => {}
};
Hello, I'd like to add a suggestion to create a mock for
React.i18nManager
.My team ran into an issue where an OSS module was referring it and failed to build during the test runner setup process. Our workaround is to import react-native-mock in the runner setup script and assign a i18nManager mock. However, it would be nice if react-native-mock supported it out of the box.