add test_unit_app task

This commit is contained in:
Tim Alby 2018-05-23 14:10:33 +02:00
parent 103ddd79ef
commit a9f1989eca
3 changed files with 10 additions and 0 deletions

View file

@ -187,6 +187,9 @@ test: test_unit test_frontend test_acceptance
test_unit:
npm -q run test:unit -- ${MOCHA_ARGS}
test_unit_app:
npm -q run test:unit:app -- ${MOCHA_ARGS}
test_frontend: test_clean # stop service
$(MAKE) compile
docker-compose ${DOCKER_COMPOSE_FLAGS} up test_frontend

6
services/web/bin/unit_test_app Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
set -e;
MOCHA="node_modules/.bin/mocha --exit --recursive --reporter spec"
$MOCHA "$@" test/unit/js

View file

@ -15,6 +15,7 @@
"test:acceptance:dir": "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 && bin/unit_test $@",
"test:unit:app": "npm -q run compile && bin/unit_test_app $@",
"test:frontend": "karma start",
"compile": "make compile",
"start": "npm -q run compile && node $NODE_APP_OPTIONS app.js",