diff --git a/gruntfile.js b/gruntfile.js index beb6b3f..1440ec6 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -51,22 +51,9 @@ module.exports = function(grunt) { ] }, - connect: { - server: { - options: { - port: 9001, - hostname: '127.0.0.1', - base: '.' - } - } - }, - - mocha: { - test: { - options: { - log: true, - urls: [ 'http://127.0.0.1:9001/tests/index.html' ] - } + shell: { + mocha: { + command: './node_modules/.bin/mocha --reporter list --no-exit tests/node-runner.js' } }, @@ -179,11 +166,11 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-npm'); grunt.loadNpmTasks('grunt-git'); grunt.loadNpmTasks('grunt-prompt'); + grunt.loadNpmTasks('grunt-shell'); grunt.registerTask('develop', ['clean', 'requirejs']); grunt.registerTask('release', ['develop', 'uglify']); grunt.registerTask('check', ['jshint']); - grunt.registerTask('test', ['check', 'connect', 'mocha']); grunt.registerTask('publish', 'Publish filer as a new version to NPM, bower and github.', function(patchLevel) { var allLevels = ['patch', 'minor', 'major']; @@ -214,6 +201,7 @@ module.exports = function(grunt) { 'npm-publish' ]); }); + grunt.registerTask('test', ['check', 'shell:mocha']); grunt.registerTask('default', ['develop']); }; diff --git a/package.json b/package.json index 49af3a1..2eea605 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "grunt-contrib-uglify": "~0.1.2", "grunt-contrib-watch": "~0.3.1", "grunt-git": "0.2.10", + "grunt-shell": "~0.7.0", "grunt-mocha": "0.4.10", "grunt-npm": "git://github.com/sedge/grunt-npm.git#branchcheck", "grunt-prompt": "^1.1.0",