react-native-firebase/bridge
Chris Bianca 42e7fb2e5d [ios] Firebase iOS v5 support 2018-05-16 17:22:47 +01:00
..
android [tests][android] misc build 2018-05-13 01:36:02 +01:00
e2e [misc] Update pods for tests and bridge 2018-05-15 10:01:52 +01:00
functions [tests] add logging to cloud function + use deepEqual 2018-05-06 00:48:56 +01:00
helpers [tests][helpers] add Promise.defer() helper 2018-05-13 18:29:34 +01:00
ios [ios] Firebase iOS v5 support 2018-05-16 17:22:47 +01:00
.babelrc [tests] update dependencies and fix related issues 2018-04-21 18:59:52 +01:00
.buckconfig rename new tests directory and add to npmignore 2018-03-28 16:43:51 +01:00
.editorconfig rename new tests directory and add to npmignore 2018-03-28 16:43:51 +01:00
.eslintrc rename new tests directory and add to npmignore 2018-03-28 16:43:51 +01:00
.firebaserc [tests][functions] create testing cloud function project 2018-05-05 18:22:08 +01:00
.flowconfig rename new tests directory and add to npmignore 2018-03-28 16:43:51 +01:00
.gitignore update git ignore 2018-04-21 15:53:35 +01:00
.watchmanconfig rename new tests directory and add to npmignore 2018-03-28 16:43:51 +01:00
README.md [tests] misc 2018-04-12 18:13:40 +01:00
app.js [tests][firestore] remove logging 2018-04-16 20:20:00 +01:00
firebase.json [tests][functions] create testing cloud function project 2018-05-05 18:22:08 +01:00
index.android.js rename new tests directory and add to npmignore 2018-03-28 16:43:51 +01:00
index.js rename new tests directory and add to npmignore 2018-03-28 16:43:51 +01:00
package-lock.json [firestore][android] Add support for firestore v16 2018-05-08 15:36:49 +01:00
package.json update bridge version 2018-04-22 16:06:13 +01:00
rn-cli.config.js [bridge] import RNF from project directory directly via module alias + metro config 2018-03-30 17:09:32 +01:00

README.md

React Native Firebase - Testing Project

Requirements

  • Make sure you have Xcode installed (tested with Xcode 8.1-8.2).
  • make sure you have node installed (brew install node, node 7.6.0 and up is required.
  • Make sure you have react-native dependencies installed:
    • react-native-cli is installed (npm install -g react-native-cli)
    • watchman is installed (brew install watchman)
    • appleSimUtils
    • detox-cli npm install -g detox-cli

Step 1: Npm install

  • Run npm install.

To test build of your app

Step 2: Build

  • Build the demo project
detox build --configuration ios.sim.debug

Step 3: Test

  • start react-native packager
npm run start
  • Run tests on the demo project
detox test --configuration ios.sim.debug

This action will open a new simulator and run the tests on it.

TODO - Troubleshooting

Gradle issues... https://stackoverflow.com/questions/46917365/error-could-not-initialize-class-com-android-sdklib-repository-androidsdkhandle?rq=1

mac: export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home" windows "C://Program Files/Java/jdk_1.x_"

android sdk root export ANDROID_SDK_ROOT="/Users/mike/Library/Android/sdk"

Add platform-tools to your path

echo 'export ANDROID_HOME=/Users/$USER/Library/Android/sdk' >> ~/.bash_profile echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.bash_profile

Name: TestingAVD

CPU/ABI: null (null)

Path: /Users/mike/.android/avd/Actually_THIS_one.avd

Error: Failed to parse properties from /Users/mike/.android/avd/Actually_THIS_one.avd/config.ini

Running specific tests

Mocha supports the .only syntax, e.g. instead of describe(...) || it(...) you can use describe.only(...) || it.only(...) to only run that specific context or test.

Another way to do this is via adding a --grep option to e2e/mocha.opts file, e.g. --grep auth for all tests that have auth in the file path or tests descriptions.

Running Node debugger

Add --inspect to e2e/mocha.opts file

To open node debugger tools on chrome navigate to chrome://inspect/#devices and click the Open dedicated DevTools for Node link.

Add the default connection of localhost:9229 if you haven't already - then the debugger will automatically connect everytime you start tests with inspect flag.

Mocha options

See https://mochajs.org/#usage