mirror of
https://github.com/wassname/side-by-side.git
synced 2026-09-10 12:37:06 +08:00
Use npm to test
This commit is contained in:
@@ -1,10 +1,3 @@
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- 0.10
|
||||
|
||||
script:
|
||||
- make
|
||||
- make run &
|
||||
- sleep 5
|
||||
- make test
|
||||
|
||||
+10
-1
@@ -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' ]
|
||||
|
||||
@@ -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/
|
||||
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user