marcopeg / grunt-mocha-chai-sinon

Simple test runner task for NodeJS
8 stars 3 forks source link

Does not work with out test coverage #2

Closed procedurallygenerated closed 10 years ago

procedurallygenerated commented 10 years ago

TypeError: Cannot read property 'options' of undefined at Object.module.exports (node_modules/grunt-mocha-chai-sinon/tasks/mocha-chai-sinon.js:24:58)

Does not like it if i do not have test coverage. I just put an if around it.

if(grunt.config.data['mocha-chai-sinon'].coverage) { require('blanket')({ pattern: grunt.config.data['mocha-chai-sinon'].coverage.options.filter || filterProjectSrc }); } else { require('blanket')({ pattern: filterProjectSrc }); }

marcopeg commented 10 years ago

pull request #1 solved this issue