Use npm to test

This commit is contained in:
Vit Brunner
2014-10-24 19:38:49 +02:00
parent 5bf8071ac1
commit 27daa94af5
5 changed files with 13 additions and 23 deletions
-7
View File
@@ -1,10 +1,3 @@
language: node_js
node_js:
- 0.10
script:
- make
- make run &
- sleep 5
- make test
+10 -1
View File
@@ -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' ]
-11
View File
@@ -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/
+1 -2
View File
@@ -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`.
+2 -2
View File
@@ -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"