Close GH-611: Istanbul code coverage.

This commit is contained in:
Sven Lito
2013-07-11 19:15:49 +01:00
committed by André Cruz
parent 8574d50eaa
commit c7be3d73b9
3 changed files with 17 additions and 1 deletions

2
.gitignore vendored
View File

@@ -7,3 +7,5 @@
/bower.json
/bower_components
/test/reports/

View File

@@ -26,14 +26,26 @@ module.exports = function (grunt) {
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint', 'simplemocha:short']
},
shell: {
cover: {
command: 'node node_modules/istanbul/lib/cli.js cover --dir ./test/reports node_modules/mocha/bin/_mocha -- -R dot',
options: {
stdout: true,
stderr: true
}
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-execute');
grunt.registerTask('test', ['execute:assets', 'simplemocha:full']);
grunt.registerTask('cover', 'shell:cover');
grunt.registerTask('default', ['jshint', 'test']);
};

View File

@@ -56,7 +56,9 @@
"grunt-contrib-jshint": "~0.5.4",
"grunt-execute": "~0.1.4",
"mocha": "~1.12.0",
"nock": "~0.17.5"
"nock": "~0.17.5",
"grunt-shell": "~0.3.0",
"istanbul": "~0.1.42"
},
"scripts": {
"test": "grunt test"