Skip to content

Commit

Permalink
Adding coverage support
Browse files Browse the repository at this point in the history
  • Loading branch information
monsur committed Jan 4, 2015
1 parent 1199727 commit e66f787
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,4 +1,5 @@
*~
coverage.html
dest
node_modules
.DS_Store
13 changes: 11 additions & 2 deletions Gruntfile.js
Expand Up @@ -4,7 +4,7 @@ module.exports = function(grunt) {
jshint: {
server: [
'src/server/**/*.js',
'tests/server/**/*.js'
'test/server/**/*.js'
],
client: [
'Gruntfile.js',
Expand All @@ -18,8 +18,17 @@ module.exports = function(grunt) {
server: {
options: {
reporter: 'spec',
require: 'coverage/blanket'
},
src: ['tests/server/**/*.test.js']
src: ['test/server/**/*.test.js']
},
coverage: {
options: {
reporter: 'html-cov',
quiet: true,
captureFile: 'coverage.html'
},
src: '<%= mochaTest.server.src %>'
}
},
concat: {
Expand Down
7 changes: 7 additions & 0 deletions coverage/blanket.js
@@ -0,0 +1,7 @@
var path = require('path');
var srcDir = path.join(__dirname, '..', 'src');

require('blanket')({
// Only files that match the pattern will be instrumented
pattern: srcDir
});
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -21,6 +21,7 @@
"socket.io": "1.2.1"
},
"devDependencies": {
"blanket": "^1.1.6",
"grunt": "^0.4.5",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-copy": "^0.7.0",
Expand Down
File renamed without changes.

0 comments on commit e66f787

Please sign in to comment.