You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17-19
Original file line number
Diff line number
Diff line change
@@ -37,13 +37,13 @@ Follow these steps to test your modifications to the plugin manually:
37
37
38
38
First, make sure you have installed the dependencies for the plugin by following the steps above.
39
39
40
-
Then, make sure you have installed `gulp`.
40
+
Then, make sure you have installed `react-native-cli`.
41
41
42
42
```
43
-
npm install -g gulp
43
+
npm install -g react-native-cli
44
44
```
45
45
46
-
To run Android tests, make sure you have `sdk\tools` and `sdk\platform-tools` in your PATH.
46
+
To run Android tests, make sure you have `sdk\tools`, `sdk\emulator` and `sdk\platform-tools` in your PATH.
47
47
48
48
To run iOS tests, make sure you've installed CocoaPods and have `.gem/bin` in your PATH.
49
49
@@ -62,43 +62,41 @@ The tests first build the app.
62
62
63
63
They then check if the required emulators are currently running.
64
64
65
-
If an Android emulator is not running, it attempts to boot an Android emulator named `emulator`. You can specify an emulator by adding `--androidemu yourEmulatorNameHere`as a command line option to the gulp task.
65
+
If an Android emulator is not running, it attempts to boot the latest Android emulator. You can specify an emulator by adding env variable `ANDROID_EMU=yourEmulatorNameHere`to the npm command. For example: `ANDROID_EMU=yourEmulatorNameHere npm run test:android`.
66
66
67
-
If an iOS simulator is not running, it attempts to boot the latest iOS iPhone simulator. You can specify a simulator by adding `--iosemu yourSimulatorNameHere`as a command line option to the gulp task.
67
+
If an iOS simulator is not running, it attempts to boot the latest iOS iPhone simulator. You can specify a simulator by adding env variable `IOS_EMU=yourSimulatorNameHere`to the npm command. For example: `IOS_EMU="iPhone 8 (0567DFF8-329E-41A3-BD6D-E48E9DD5EF39)" npm run test:ios`.
68
68
69
69
If all the required emulators are not running and the tests fail to boot them, the tests will fail.
70
70
71
-
If you would like the tests to always restart the necessary emulators (killing them if they are currently running), add a `--clean` flag to the command.
71
+
If you would like the tests to always restart the necessary emulators (killing them if they are currently running), setup a env variable `CLEAN=true`to the command. For example: `CLEAN=true npm run test`.
72
72
73
73
The desired unit tests are then run.
74
74
75
-
If you would like to skip building, add a `-fast`to the end of the command you'd like to run. For example, `gulp test-ios` becomes `gulp test-ios-fast`.
75
+
If you would like to skip building, add a `:fast`in the command you'd like to run. For example, `npm run test:ios` becomes `npm run test:fast:ios` or `npm run test:android` becomes `npm run test:fast:android`.
76
76
77
-
There is a both a full unit test suite and a "core" set of unit tests that you may run. If you would like to run only the core tests, add a `--core` flag to the command.
77
+
There is a both a full unit test suite and a "core" set of unit tests that you may run. If you would like to run only the core tests, setup a env variable `CORE=true`to the command. For example: `CORE=true npm run test:android`.
78
78
79
-
If you would like to pull the plugin from NPM rather than running the tests on the local version, add a `--npm` flag to the command.
80
-
81
-
If you add a `--report` flag to the command, the mocha reporter outputs individual results files for each platform. These are `./test_android.xml`, `./test-ios-ui.xml`, and `./test-ios-wk.xml`.
79
+
If you would like to pull the plugin from NPM rather than running the tests on the local version, setup a env variable `NPM=true` to the command. For example: `NPM=true npm run test:ios`.
82
80
83
81
#### Default
84
82
85
83
To run all of the unit tests on Android and iOS:
86
84
```
87
-
gulp test
85
+
npm run test
88
86
```
89
87
90
88
#### iOS
91
89
92
90
To run all of the unit tests on iOS:
93
91
```
94
-
gulp test-ios
92
+
npm run test:ios
95
93
```
96
94
97
95
#### Android
98
96
99
97
To run all of the unit tests on Android:
100
98
```
101
-
gulp test-android
99
+
npm run test:android
102
100
```
103
101
104
102
#### More examples
@@ -110,27 +108,27 @@ android, ios
110
108
111
109
To run the core unit tests on Android:
112
110
```
113
-
gulp test-android --core
111
+
CORE=true npm run test:android
114
112
```
115
113
116
114
To run all of the unit tests on iOS and pull the plugin from NPM:
117
115
```
118
-
gulp test-ios --npm
116
+
NPM=true npm run test:ios
119
117
```
120
118
121
119
To run all of the unit tests on Android and iOS without building first:
122
120
```
123
-
gulp test-fast
121
+
npm run test:fast
124
122
```
125
123
126
124
To run all of the unit tests on iOS and restart the emulators:
127
125
```
128
-
gulp test-ios --clean
126
+
CLEAN=true npm run test:ios
129
127
```
130
128
131
129
To run the core unit tests on Android and pull the plugin from NPM:
0 commit comments