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

Run npm with -q flag for less verbose test output

James Allen 8 лет назад
Родитель
Сommit
870e87ebe1
2 измененных файлов с 7 добавлено и 7 удалено
  1. 3 3
      services/web/Makefile
  2. 4 4
      services/web/package.json

+ 3 - 3
services/web/Makefile

@@ -1,5 +1,5 @@
 DOCKER_COMPOSE_FLAGS ?= -f docker-compose.yml
-NPM := docker-compose ${DOCKER_COMPOSE_FLAGS} run --rm npm npm
+npm -q := docker-compose ${DOCKER_COMPOSE_FLAGS} run --rm npm -q npm
 BUILD_NUMBER ?= local
 BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
 PROJECT_NAME = web
@@ -43,7 +43,7 @@ docker-shared.yml:
 test: test_unit test_acceptance
 
 test_unit: docker-shared.yml
-	docker-compose ${DOCKER_COMPOSE_FLAGS} run --rm test_unit npm run test:unit -- ${MOCHA_ARGS}
+	docker-compose ${DOCKER_COMPOSE_FLAGS} run --rm test_unit npm -q run test:unit -- ${MOCHA_ARGS}
 
 test_acceptance: test_acceptance_app test_acceptance_modules
 
@@ -56,7 +56,7 @@ test_acceptance_app_stop_service: docker-shared.yml
 	docker-compose ${DOCKER_COMPOSE_FLAGS} stop test_acceptance redis mongo
 
 test_acceptance_app_run: docker-shared.yml
-	docker-compose ${DOCKER_COMPOSE_FLAGS} exec -T test_acceptance npm run test:acceptance -- ${MOCHA_ARGS}
+	docker-compose ${DOCKER_COMPOSE_FLAGS} exec -T test_acceptance npm -q run test:acceptance -- ${MOCHA_ARGS}
 
 test_acceptance_modules: docker-shared.yml
 	for dir in modules/*; \

+ 4 - 4
services/web/package.json

@@ -12,13 +12,13 @@
   "scripts": {
     "test:acceptance:wait_for_app": "echo 'Waiting for app to be accessible' && while (! curl -s -o /dev/null localhost:3000/status) do sleep 1; done",
     "test:acceptance:run": "bin/acceptance_test $@",
-    "test:acceptance:dir": "npm run compile:acceptance_tests && npm run test:acceptance:wait_for_app && npm run test:acceptance:run -- $@",
-    "test:acceptance": "npm run test:acceptance:dir -- $@ test/acceptance/js",
-    "test:unit": "npm run compile:app && npm run compile:unit_tests && bin/unit_test $@",
+    "test:acceptance:dir": "npm -q run compile:acceptance_tests && npm -q run test:acceptance:wait_for_app && npm -q run test:acceptance:run -- $@",
+    "test:acceptance": "npm -q run test:acceptance:dir -- $@ test/acceptance/js",
+    "test:unit": "npm -q run compile:app && npm -q run compile:unit_tests && bin/unit_test $@",
     "compile:unit_tests": "bin/compile_unit_tests",
     "compile:acceptance_tests": "bin/compile_acceptance_tests",
     "compile:app": "bin/compile_app",
-    "start": "npm run compile:app && node app.js"
+    "start": "npm -q run compile:app && node app.js"
   },
   "dependencies": {
     "archiver": "0.9.0",