Fix failing travis/phantomjs tests by adding testing web server--run npm install

This commit is contained in:
David Humphrey (:humph) david.humphrey@senecacollege.ca 2014-03-26 21:07:10 -04:00
parent 60a9dc2470
commit 3e11408f44
2 changed files with 16 additions and 4 deletions

View File

@ -39,11 +39,21 @@ module.exports = function(grunt) {
]
},
connect: {
server: {
options: {
port: 9001,
hostname: '127.0.0.1',
base: '.'
}
}
},
mocha: {
test: {
src: 'tests/index.html',
options: {
log: true
log: true,
urls: [ 'http://127.0.0.1:9001/tests/index.html' ]
}
}
},
@ -81,11 +91,12 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('develop', ['clean', 'requirejs']);
grunt.registerTask('release', ['develop', 'uglify']);
grunt.registerTask('check', ['jshint']);
grunt.registerTask('test', ['check', 'mocha']);
grunt.registerTask('test', ['check', 'connect', 'mocha']);
grunt.registerTask('default', ['develop']);
};

View File

@ -28,6 +28,7 @@
"grunt-contrib-connect": "~0.1.2",
"grunt-contrib-concat": "~0.1.3",
"grunt-contrib-jshint": "~0.7.1",
"grunt-mocha": "0.4.10"
"grunt-mocha": "0.4.10",
"grunt-contrib-connect": "~0.7.1"
}
}