Skip to content

Commit

Permalink
Add mocha for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed May 31, 2017
1 parent ec88244 commit d525d4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
13 changes: 11 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-mocha-test');

grunt.initConfig({
jshint: {
Expand All @@ -16,8 +17,16 @@ module.exports = function(grunt) {
},
},
},
mochaTest: {
test: {
src: ['test/**/*.js'],
options: {
reporter: 'spec',
},
},
},
});

grunt.registerTask('test', ['jshint']);
grunt.registerTask('default', ['test']);
grunt.registerTask('test', ['mochaTest']);
grunt.registerTask('default', ['jshint', 'test']);
};
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Configure Medic Mobile deployments",
"main": "index.js",
"scripts": {
"test": "grunt test"
"test": "grunt jshint test"
},
"bin": {
"medic-conf": "bin/medic-conf"
Expand All @@ -24,7 +24,10 @@
"request-promise-native": "^1.0.4"
},
"devDependencies": {
"chai": "^4.0.0",
"grunt": "^1.0.1",
"grunt-contrib-jshint": "^1.1.0"
"grunt-contrib-jshint": "^1.1.0",
"grunt-mocha-test": "^0.13.2",
"mocha": "^3.4.2"
}
}

0 comments on commit d525d4e

Please sign in to comment.