Convert frontend test runs to use Docker/karma

This commit is contained in:
Alasdair Smith 2018-02-13 15:42:27 +00:00
parent ff7e016227
commit 24ec7b77ab
3 changed files with 4 additions and 9 deletions

View file

@ -181,8 +181,9 @@ test: test_unit test_frontend test_acceptance
test_unit:
npm -q run test:unit -- ${MOCHA_ARGS}
test_frontend:
npm -q run test:frontend -- ${MOCHA_ARGS}
test_frontend: test_clean # stop service
$(MAKE) compile
docker-compose ${DOCKER_COMPOSE_FLAGS} up test_frontend
test_acceptance: test_acceptance_app test_acceptance_modules

View file

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

View file

@ -15,8 +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:frontend": "npm -q run compile && bin/frontend_test $@",
"test:karma": "npm -q run compile && karma start --single-run",
"test:frontend": "karma start --single-run",
"compile": "make compile",
"start": "npm -q run compile && node app.js",
"nodemon": "nodemon --config nodemon.json",