Browse Source

separating tests

Daniel Zlotin 8 years ago
parent
commit
274da152ba
2 changed files with 10 additions and 6 deletions
  1. 6
    5
      .travis.yml
  2. 4
    1
      package.json

+ 6
- 5
.travis.yml View File

18
   - ./scripts/clean.sh
18
   - ./scripts/clean.sh
19
 
19
 
20
 install:
20
 install:
21
-  #- npm i -g yarn
22
-  #- yarn
23
-  - source ./scripts/installAndroidSDK.sh
21
+  - npm i -g yarn
22
+  - yarn
24
 
23
 
25
 script:
24
 script:
26
-  #- npm run test
27
-  - cd android && ./gradlew clean testDebugUnitTest
25
+  - npm run lint
26
+  - npm run test:js
27
+  - source ./scripts/installAndroidSDK.sh
28
+  - npm run test:android
28
 
29
 
29
 after_script:
30
 after_script:
30
   - echo "BUILD FINISHED"
31
   - echo "BUILD FINISHED"

+ 4
- 1
package.json View File

21
   "scripts": {
21
   "scripts": {
22
     "build": ":",
22
     "build": ":",
23
     "lint": "eslint src test",
23
     "lint": "eslint src test",
24
+    "test:js": "jest",
25
+    "test:android": "cd android && ./gradlew clean testDebugUnitTest",
26
+    "test:ios": ":",
24
     "pretest": "npm run lint",
27
     "pretest": "npm run lint",
25
-    "test": "cd android && ./gradlew clean testDebugUnitTest",
28
+    "test": "npm run test:js && npm run test:android && npm run test:ios",
26
     "release": "npm version prerelease && npm publish --tag next && npm view react-native-navigation dist-tags && git push"
29
     "release": "npm version prerelease && npm publish --tag next && npm view react-native-navigation dist-tags && git push"
27
   },
30
   },
28
   "peerDependencies": {
31
   "peerDependencies": {