Ver código fonte

separating tests

Daniel Zlotin 8 anos atrás
pai
commit
274da152ba
2 arquivos alterados com 10 adições e 6 exclusões
  1. 6
    5
      .travis.yml
  2. 4
    1
      package.json

+ 6
- 5
.travis.yml Ver arquivo

@@ -18,13 +18,14 @@ before_install:
18 18
   - ./scripts/clean.sh
19 19
 
20 20
 install:
21
-  #- npm i -g yarn
22
-  #- yarn
23
-  - source ./scripts/installAndroidSDK.sh
21
+  - npm i -g yarn
22
+  - yarn
24 23
 
25 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 30
 after_script:
30 31
   - echo "BUILD FINISHED"

+ 4
- 1
package.json Ver arquivo

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