adding jasmine tests

This commit is contained in:
Bala Clark 2013-05-07 23:01:41 +02:00
parent 32edfd4e80
commit 1ae28723eb
19 changed files with 4310 additions and 14 deletions

19
Makefile Normal file → Executable file
View file

@ -1,3 +1,6 @@
#
# build package & update examples
#
build:
@echo "Running jshint..."
@ -24,6 +27,22 @@ build:
@cp -r comicbook examples
@echo "Done"
#
# run jshint & jasmine tests
#
test:
@./node_modules/.bin/jshint lib/ComicBook.js --config lib/.jshintrc
@./node_modules/.bin/jshint lib/tests/spec/*.js --config lib/.jshintrc
@node lib/tests/server.js &
@./node_modules/.bin/phantomjs lib/tests/run-jasmine.js http://127.0.0.1:3000/lib/tests/SpecRunner.html
@kill -9 `cat lib/tests/pid.txt`
@rm lib/tests/pid.txt
#
# remove prior builds
#
clean:
@rm -r comicbook
@rm -r examples/comicbook