add mocha tests to travis, remove makefile

This commit is contained in:
Matteo Pagliazzi 2014-01-15 20:11:29 +01:00
parent 9db6dd9233
commit 263a752abf
4 changed files with 2 additions and 21 deletions

View file

@ -4,7 +4,7 @@ node_js:
services:
- mongodb
before_script:
- 'npm install -g grunt-cli'
- 'npm install -g grunt-cli mocha'
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- cp config.json.example config.json

View file

@ -1,18 +0,0 @@
compile:
./node_modules/coffee-script/bin/coffee -bw -o ./lib -c ./src
MOCHA_TESTS := $(shell find test/ -name '*.mocha.*')
MOCHA = mocha --compilers coffee:coffee-script
OUT_FILE = "test-output.tmp"
g = "."
test-mocha:
@NODE_ENV=test $(MOCHA) --grep "$(g)" $(MOCHA_TESTS)
#@NODE_ENV=test $(MOCHA) --grep "$(g)" $(MOCHA_TESTS) | tee $(OUT_FILE)
test-casper:
casperjs test ./test/rest.casper.coffee
test!:
@perl -n -e '/\[31m 0\) (.*?).\[0m/ && print "make test g=\"$$1\$$\""' $(OUT_FILE) | sh

View file

@ -1,7 +1,6 @@
--colors
--reporter spec
--timeout 4000
--ignore-leaks
--growl
--debug
--compilers coffee:coffee-script

View file

@ -17,4 +17,4 @@ NODE_PID=$!
trap "kill $NODE_PID && curl http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer" EXIT
sleep 3 # Wait for Selenium
grunt karma:continuous && ./node_modules/protractor/bin/protractor protractor.conf.js
mocha && grunt karma:continuous && ./node_modules/protractor/bin/protractor protractor.conf.js