Просмотр исходного кода

Make :run npm commands 'private'

James Allen 8 лет назад
Родитель
Сommit
02918189ca

+ 2 - 2
services/chat/docker-compose.ci.yml

@@ -11,7 +11,7 @@ services:
     volumes:
       - .:/app
     working_dir: /app
-    entrypoint: npm run test:unit:run
+    entrypoint: npm run test:unit:_run
 
   test_acceptance:
     image: node:4.2.1
@@ -24,7 +24,7 @@ services:
     depends_on:
       - redis
       - mongo
-    entrypoint: npm run test:acceptance:run
+    entrypoint: npm run test:acceptance:_run
 
   redis:
     image: redis

+ 5 - 5
services/chat/package.json

@@ -9,14 +9,14 @@
   "scripts": {
     "compile:app": "coffee -o app/js -c app/coffee && coffee -c app.coffee",
     "start": "npm run compile:app && node app.js",
-    "test:acceptance:run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
-    "test:acceptance": "npm run compile:app && npm run compile:acceptance_tests && npm run test:acceptance:run -- $@",
-    "test:unit:run": "mocha --recursive --reporter spec $@ test/unit/js",
-    "test:unit": "npm run compile:app && npm run compile:unit_tests && npm run test:unit:run -- $@",
+    "test:acceptance": "npm run compile:app && npm run compile:acceptance_tests && npm run test:acceptance:_run -- $@",
+    "test:unit": "npm run compile:app && npm run compile:unit_tests && npm run test:unit:_run -- $@",
     "compile:unit_tests": "[ -e test/unit ] && coffee -o test/unit/js -c test/unit/coffee || echo 'No unit tests to compile'",
     "compile:acceptance_tests": "[ -e test/acceptance ] && coffee -o test/acceptance/js -c test/acceptance/coffee || echo 'No acceptance tests to compile'",
     "compile:all": "npm run compile:app && npm run compile:unit_tests && npm run compile:acceptance_tests",
-    "nodemon": "nodemon --config nodemon.json"
+    "nodemon": "nodemon --config nodemon.json",
+    "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
+    "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js"
   },
   "dependencies": {
     "async": "0.2.9",

+ 0 - 25
services/chat/test/acceptance/scripts/full-test.sh

@@ -1,25 +0,0 @@
-#! /usr/bin/env bash
-
-# npm rebuild
-
-sleep 60
-
-echo ">> Starting server..."
-
-grunt --no-color forever:app:start
-
-echo ">> Server started"
-
-sleep 5
-
-echo ">> Running acceptance tests..."
-grunt --no-color mochaTest:acceptance
-_test_exit_code=$?
-
-echo ">> Killing server"
-
-grunt --no-color forever:app:stop
-
-echo ">> Done"
-
-exit $_test_exit_code