From 09089fa812cc06a34551d2891d9ad8922b1abe9d Mon Sep 17 00:00:00 2001 From: Mike Barrett Date: Thu, 17 Jul 2014 22:49:43 +0100 Subject: [PATCH] add mocha + chai --- Gruntfile.js | 12 +++++++++++- package.json | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) 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" } }