Prechádzať zdrojové kódy

For testing, run lint & unit tests for now

Kevin van Zonneveld 9 rokov pred
rodič
commit
2046e7a6a7
3 zmenil súbory, kde vykonal 7 pridanie a 7 odobranie
  1. 2 2
      .travis.yml
  2. 4 4
      bin/test
  3. 1 1
      package.json

+ 2 - 2
.travis.yml

@@ -11,8 +11,8 @@ addons:
       - g++-4.8
 
 script:
-  - npm run-script lint
-  - npm run-script build
+  - npm run build
+  - npm run test
   # Automatically deploy website onto gh-pages (if master and not PR)
   # Don't do this in `after_success`, because then failures won't bubble up
   - git config --global user.name 'Uppy Bot'

+ 4 - 4
bin/test

@@ -2,7 +2,7 @@
 set -o pipefail
 set -o errexit
 set -o nounset
-# set -o xtrace
+set -o xtrace
 
 # Set magic variables for current file & dir
 __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -13,11 +13,11 @@ __base="$(basename ${__file} .sh)"
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 cd ${DIR}/..
 
-npm run phantom-test -s
-result=$?
+npm run test:phantom
+result=${?}
 if [ "$result" = 0 ]; then
   if [ "${CI}" = "true" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
-    npm run zuul-test -s
+    npm run zuul-test
     result=$?
   else
     echo "Skipping zuul-test as this is not a master CI branch test run"

+ 1 - 1
package.json

@@ -16,7 +16,7 @@
     "fix": "eslint . --fix",
     "start": "npm run build && npm run web",
     "test:phantom": "zuul test/spec/upload.js --phantom",
-    "test": "bin/test",
+    "test": "npm run lint && npm run test:unit",
     "test:unit": "node test/index.js",
     "fast:css": "nodemon --watch src -e scss -x 'npm run build:css'",
     "watch:fast": "parallelshell 'npm run web:fast' 'npm run fast:css'",