invertase/react-native-firebase-starter

[help-wanted] Add tests example

Open

#21 opened on 2018年4月13日

GitHub で見る
 (2 comments) (6 reactions) (0 assignees)JavaScript (1,174 stars) (346 forks)batch import
enhancementhelp wanted

説明

After following the getting started instructions, running npm test results in an error:

 FAIL  ./App.test.js
  ● Test suite failed to run

    RNFirebase core module was not found natively on iOS, ensure you have correctly included the RNFirebase pod in your projects `Podfile` and have run `pod install`.

     See http://invertase.link/ios for the ios setup guide.

       9 | } from 'react-native'
      10 |
    > 11 | import firebase from 'react-native-firebase'
      12 |
      13 | export default class App extends React.Component {
      14 |   constructor () {
      Error: RNFirebase core module was not found natively on iOS, ensure you have correctly included the RNFirebase pod in your projects `Podfile` and have run `pod install`.

This has already been reported in the react-native-firebase repo and it appears this is expected behavior - according to that thread RNFirebase needs to be mocked out for the tests to work.

Assuming that's all correct, I would propose adding a basic mock for RNFirebase to this starter project and enabling it by default.

コントリビューターガイド