From 11734e51bdb5e4f937ae8f68c60f6491807269ff Mon Sep 17 00:00:00 2001 From: Salakar Date: Mon, 1 May 2017 16:01:00 +0100 Subject: [PATCH] [tests] import RNFirebase for parent directory rather than from npm file:.. syntax --- package.json | 3 ++- tests/.gitignore | 1 - tests/android/settings.gradle | 2 +- tests/ios/Podfile | 40 +++++++++++++++++++++++++++++++++++ tests/src/firebase.js | 2 +- 5 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 tests/ios/Podfile diff --git a/package.json b/package.json index b5ad4acc..da70fca0 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "dev": "npm run compile -- --watch", "lint": "eslint ./src", "publish_pages": "gh-pages -d public/", - "watchcpx": "echo 'See https://github.com/wix/wml for watching changes. \r\n'", + "tests-packager": "cd tests && npm run start", + "tests-pod-install": "cd tests && npm run ios:pod:install", "flow": "flow" }, "repository": { diff --git a/tests/.gitignore b/tests/.gitignore index 6e4a1e09..8f21ab5f 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -55,7 +55,6 @@ buck-out/ fastlane/report.xml fastlane/Preview.html fastlane/screenshots -ios/Podfile ios/Podfile.lock ios/Pods/ ios/ReactNativeFirebaseDemo.xcworkspace/ diff --git a/tests/android/settings.gradle b/tests/android/settings.gradle index 444f86ec..4ead5270 100644 --- a/tests/android/settings.gradle +++ b/tests/android/settings.gradle @@ -1,6 +1,6 @@ rootProject.name = 'ReactNativeFirebaseDemo' include ':react-native-firebase' -project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android') +project(':react-native-firebase').projectDir = new File(rootProject.projectDir, './../../android') include ':react-native-vector-icons' project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') diff --git a/tests/ios/Podfile b/tests/ios/Podfile new file mode 100644 index 00000000..f35d97f5 --- /dev/null +++ b/tests/ios/Podfile @@ -0,0 +1,40 @@ +install! 'cocoapods', :deterministic_uuids => false +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +target 'ReactNativeFirebaseDemo' do + platform :ios, '8.0' + # Uncomment this line if you're using Swift or would like to use dynamic frameworks + # use_frameworks! + + # Pods for ReactNativeFirebaseDemo + pod 'React', :path => '../node_modules/react-native', :subspecs => [ + 'Core', + 'RCTActionSheet', + 'RCTAnimation', + 'RCTCameraRoll', + 'RCTGeolocation', + 'RCTImage', + 'RCTLinkingIOS', + 'RCTNetwork', + 'RCTPushNotification', + 'RCTSettings', + 'RCTText', + 'RCTVibration', + 'RCTWebSocket' + # Add any other subspecs you want to use in your project + ] + + pod 'Firebase/Auth' + pod 'Firebase/Analytics' + pod 'Firebase/AppIndexing' + pod 'Firebase/Core' + pod 'Firebase/Crash' + pod 'Firebase/Database' + pod 'Firebase/DynamicLinks' + pod 'Firebase/Messaging' + pod 'Firebase/RemoteConfig' + pod 'Firebase/Storage' + + pod 'RNFirebase', :path => './../../' +end diff --git a/tests/src/firebase.js b/tests/src/firebase.js index e51a2b06..3f378671 100644 --- a/tests/src/firebase.js +++ b/tests/src/firebase.js @@ -1,5 +1,5 @@ import firebase from 'firebase'; -import RNfirebase from 'react-native-firebase'; +import RNfirebase from './../../'; import DatabaseContents from './tests/support/DatabaseContents';