diff --git a/Gruntfile.js b/Gruntfile.js index 42afc92..2fa8098 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -22,10 +22,20 @@ module.exports = function(grunt) { files: [ 'Gruntfile.js', 'src/**/*.js', + 'test/**/*.js' ] + }, + mochaTest: { + test: { + options: { + reporter: 'spec' + }, + src: ['test/**/*.js'] + } } }); // user defined tasks - grunt.registerTask('default', ['jshint', 'uglify']); + grunt.registerTask('test', ['mochaTest']); + grunt.registerTask('default', ['jshint', 'mochaTest', 'uglify']); }; diff --git a/package.json b/package.json index 81d6d64..dee5c49 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,13 @@ "main": "timestring.js", "version": "1.0.2", "devDependencies": { + "chai": "^1.9.1", "grunt": "^0.4.5", "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-uglify": "^0.5.0", + "grunt-mocha-test": "^0.11.0", "load-grunt-tasks": "^0.6.0", + "mocha": "^1.20.1", "time-grunt": "^0.4.0" } }