RealOrangeOne / react-native-mock

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

`done` is not a function #92

Closed taylor1791 closed 8 years ago

taylor1791 commented 8 years ago

React native has a non-standard extension to Promise. It adds a done method that throws any uncaught errors. Unless I am mistaken, I don't believe react-native-mock adds this. Are there plans to do this?

RealOrangeOne commented 8 years ago

I did not know react-native did this, so no there arent any plans for this. Can you provide some examples of this, as i'm not exactly sure what it's use is.

taylor1791 commented 8 years ago

I discovered this in the AsyncStorage Example. More research shows that using done is no longer necessary after 0fa8d16 fixed !facebook/react-native/4045.

So, if people are on a recent version of react-native they can remove it without any harm. For this reason, I don't need it anyone. In theory, if someone is on a sufficiently old version of react-native, they may need this.

If you think this is something react-native-mock does not need, feel free to close the issue.

RealOrangeOne commented 8 years ago

Seeing as it's now been fixed. I think it's fine not to support it. Generally we only try to support the most recent version of react-native