RealOrangeOne / react-native-mock

A fully mocked and test-friendly version of react native (maintainers wanted)
MIT License
570 stars 153 forks source link

Cannot find module 'buildStyleInterpolator' #68

Open kevinhylant opened 8 years ago

kevinhylant commented 8 years ago

Hey there! Thanks for all your hard work mocking this all out.

In my app I'm using buildStyleInterpolator which is provided by React Native and made available via import buildStyleInterpolator from 'buildStyleInterpolator'... which I feel is a bit strange in the first place as most library utilities like Dimensions are imported like import {Utility} from 'react-native'.

Regardless, it looks like react-native-mock is not mocking out buildStyleInterpolator as well as various other utility functions that are exported from react-native/Libraries/Utilities/** (screenshot below from my node_modules).

image

Please help me out? (I'll take a look now to see if I can't create a PR myself) images-1

RealOrangeOne commented 8 years ago

I have been thinking on a nice way of implementing these fixes. I think the best way of doing it would be in the same way we override nodes require with react-native. We should be able to do the same for any other library.

RealOrangeOne commented 8 years ago

I am hoping to start work on something like this soon, once a few more PRs are released. Hoping to bring it out inline with react-native 0.30 so we can match up the version numbers. Stay tuned for a fix!