add mocha + chai

This commit is contained in:
Mike Barrett 2014-07-17 22:49:43 +01:00
parent 34c8e04352
commit 09089fa812
2 changed files with 14 additions and 1 deletions

View File

@ -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']);
};

View File

@ -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"
}
}