Skip to content

Commit 2f6dbbc

Browse files
author
Preben Ludviksen
committed
Added unit- and integration tests for Android.
1 parent f47695b commit 2f6dbbc

File tree

9 files changed

+651
-44
lines changed

9 files changed

+651
-44
lines changed

tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ npm-debug.log
3838
buck-out/
3939
\.buckd/
4040
android/app/libs
41+
android/app/test-fs
4142
android/keystores/debug.keystore
4243

4344
modules_copy/

tests/android/app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,11 @@ android {
126126
}
127127

128128
dependencies {
129+
compile project(':react-native-filesystem')
129130
compile fileTree(dir: "libs", include: ["*.jar"])
130131
compile "com.android.support:appcompat-v7:23.0.1"
131132
compile "com.facebook.react:react-native:+" // From node_modules
133+
testCompile 'junit:junit:4.12'
132134
}
133135

134136
// Run this once to be able to run the application with BUCK

tests/android/app/src/main/java/com/rnfilesystemtests/MainApplication.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package com.rnfilesystemtests;
22

33
import android.app.Application;
4-
import android.util.Log;
54

5+
import com.benwixen.rnfilesystem.RNFileSystemPackage;
66
import com.facebook.react.ReactApplication;
7-
import com.facebook.react.ReactInstanceManager;
87
import com.facebook.react.ReactNativeHost;
98
import com.facebook.react.ReactPackage;
109
import com.facebook.react.shell.MainReactPackage;
@@ -23,7 +22,8 @@ protected boolean getUseDeveloperSupport() {
2322
@Override
2423
protected List<ReactPackage> getPackages() {
2524
return Arrays.<ReactPackage>asList(
26-
new MainReactPackage()
25+
new MainReactPackage(),
26+
new RNFileSystemPackage()
2727
);
2828
}
2929
};

0 commit comments

Comments
 (0)