Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 8708351

Browse files
committed
add instanbul for test coverage
1 parent 6f2d130 commit 8708351

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ examples/uploads/*
77
server.js
88
.tm_properties
99
.project
10+
reports

.jshintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"MediumEditor": false,
2121
"jasmine": false,
2222
"spyOn": false,
23-
"placeCaret": false
23+
"placeCaret": false,
24+
"require": false
2425
},
2526

2627
"jquery" : true,

Gruntfile.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = function(grunt) {
1+
module.exports = function (grunt) {
22
// show elapsed time at the end
33
require('time-grunt')(grunt);
44
// load grunt tasks just in time
@@ -52,6 +52,16 @@ module.exports = function(grunt) {
5252
'bower_components/blueimp-file-upload/js/jquery.fileupload.js',
5353
'bower_components/jquery-sortable/source/js/jquery-sortable-min.js'
5454
],
55+
template: require('grunt-template-jasmine-istanbul'),
56+
templateOptions: {
57+
coverage: 'reports/jasmine/coverage.json',
58+
report: [{
59+
type: 'lcov',
60+
options: {
61+
dir: 'reports/jasmine/lcov'
62+
}
63+
}]
64+
},
5565
summary: true
5666
}
5767
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"grunt-contrib-watch": "~0.6.1",
2525
"grunt-csso": "^0.7.0",
2626
"grunt-sass": "~1.1.0",
27+
"grunt-template-jasmine-istanbul": "^0.3.4",
2728
"jit-grunt": "^0.9.1",
2829
"time-grunt": "^1.1.0"
2930
},

0 commit comments

Comments
 (0)