diff --git a/.travis.yml b/.travis.yml index 04fb575..bc9dff3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,3 @@ language: node_js - node_js: - 0.10 - -script: - - make - - make run & - - sleep 5 - - make test diff --git a/Gruntfile.coffee b/Gruntfile.coffee index c939de9..87a3712 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -11,7 +11,6 @@ module.exports = (grunt) -> server: { options: { base: '<%= var.destination %>' - keepalive: true } } } @@ -54,6 +53,14 @@ module.exports = (grunt) -> ext: '.html' } } + + qunit: { + main: { + options: { + urls: [ 'http://0.0.0.0:8000/tests.html' ] + } + } + } } grunt.loadNpmTasks('grunt-contrib-connect'); @@ -61,5 +68,7 @@ module.exports = (grunt) -> grunt.loadNpmTasks('grunt-contrib-coffee'); grunt.loadNpmTasks('grunt-contrib-stylus'); grunt.loadNpmTasks('grunt-contrib-jade'); + grunt.loadNpmTasks("grunt-contrib-qunit"); grunt.registerTask 'default', [ 'copy', 'coffee', 'stylus', 'jade' ] + grunt.registerTask 'test', [ 'default', 'connect', 'qunit' ] diff --git a/Makefile b/Makefile deleted file mode 100644 index 564272b..0000000 --- a/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -default: - node_modules/.bin/grunt - -run: - node_modules/.bin/grunt connect - -test: - node_modules/.bin/phantomjs node_modules/qunitjs/addons/phantomjs/runner.js http://0.0.0.0:8000/tests.html - -clean: - rm -rf node_modules/ build/ diff --git a/README.md b/README.md index 61f3788..b287ecb 100644 --- a/README.md +++ b/README.md @@ -21,5 +21,4 @@ less like this: ### Tests -Start server with `make run` and point your browser at -`http://0.0.0.0:9778/tests.html` or run `make test` in a separate shell. +Run tests with `npm test`. diff --git a/package.json b/package.json index 8a9df9e..1344140 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,10 @@ "grunt-contrib-coffee": "0.12.x", "grunt-contrib-stylus": "0.20.x", "grunt-contrib-jade": "0.13.x", - "qunitjs": "1.13.x", - "phantomjs": "1.9.x" + "grunt-contrib-qunit": "0.5.x" }, "scripts": { + "test": "node_modules/.bin/grunt test", "postinstall": "node_modules/.bin/bower install" }, "license": "MIT"