Skip to content

Commit

Permalink
Use nyc for test coverage
Browse files Browse the repository at this point in the history
Use existing coverage as threshold values

Bump mocha back to latest that supports Node 0.12
  • Loading branch information
lovell committed Oct 24, 2017
1 parent 95e6ad5 commit 6bdb9c3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 40 deletions.
8 changes: 4 additions & 4 deletions .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ thumbs.db
node_modules/
.settings
.session.vim
coverage.html
lib-cov/
.vscode

# Ignore webstorm directories
.idea/


.bundle/
docs/_site
Gemfile.lock
Gemfile.lock

.nyc_output
coverage
27 changes: 0 additions & 27 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,6 @@ module.exports = function(grunt) {
reporter: 'spec'
},
src: ['test/**/*.js']
},
testCoverage: {
options: {
reporter: 'spec',
require: 'test/coverage/blanket'
},
src: ['test/**/*.js']
},
coverage: {
options: {
reporter: 'html-cov',
// use the quiet flag to suppress the mocha console output
quiet: true,
// specify a destination file to capture the mocha
// output (the quiet option does not suppress this)
captureFile: 'coverage.html'
},
src: ['test/**/*.js']
},
'travis-cov': {
options: {
reporter: 'travis-cov'
},
src: ['test/**/*.js']
}
}
});
Expand Down Expand Up @@ -87,7 +63,4 @@ module.exports = function(grunt) {
grunt.registerTask('default', ['jshint', 'dynamo:start', 'mochaTest']);

grunt.registerTask('test', ['jshint', 'dynamo:start', 'mochaTest:test']);

grunt.registerTask('coverage', ['jshint', 'dynamo:start', 'mochaTest:testCoverage', 'mochaTest:coverage', 'mochaTest:travis-cov']);

};
23 changes: 18 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"main": "index.js",
"scripts": {
"test": "grunt test",
"coverage": "grunt coverage"
"coverage": "nyc grunt test"
},
"keywords": [
"dynamodb",
Expand All @@ -37,20 +37,33 @@
"author": "Brandon Goode <[email protected]>",
"license": "MIT",
"devDependencies": {
"blanket": "1.1.5",
"dynamodb-local": "0.0.18",
"grunt": "^1.0.1",
"grunt-contrib-jshint": "^1.1.0",
"grunt-mocha-test": "^0.13.2",
"mocha": "^2.5.3",
"should": "^11.2.1",
"travis-cov": "^0.2.5"
"mocha": "^3.5.3",
"nyc": "^11.2.1",
"should": "^11.2.1"
},
"dependencies": {
"aws-sdk": "^2.80.0",
"debug": "^2.6.8",
"hooks": "0.3.2",
"lodash": "^4.17.4",
"q": "^1.5.0"
},
"nyc": {
"include": [
"lib/**/*.js"
],
"reporter": [
"html",
"text-summary"
],
"check-coverage": true,
"lines": 82,
"statements": 82,
"functions": 87,
"branches": 71
}
}
4 changes: 0 additions & 4 deletions test/coverage/blanket.js

This file was deleted.

0 comments on commit 6bdb9c3

Please sign in to comment.