react-native-mock icon indicating copy to clipboard operation
react-native-mock copied to clipboard

Cannot find module 'buildStyleInterpolator'

Open kevinhylant opened this issue 8 years ago • 2 comments

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

kevinhylant avatar Jun 08 '16 20:06 kevinhylant

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 avatar Jun 09 '16 08:06 RealOrangeOne

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!

RealOrangeOne avatar Jun 12 '16 19:06 RealOrangeOne