mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Merge pull request #1429 from germanrcuriel/add-coverage-report-with-blanket
Add Coverage report for Unit and Integration tests
This commit is contained in:
commit
61d693cac9
5
.gitignore
vendored
5
.gitignore
vendored
@ -57,4 +57,7 @@ CHANGELOG.md
|
|||||||
config.js
|
config.js
|
||||||
|
|
||||||
# Built asset files
|
# Built asset files
|
||||||
/core/built
|
/core/built
|
||||||
|
|
||||||
|
# Coverage reports
|
||||||
|
coverage.html
|
@ -258,6 +258,9 @@ var path = require('path'),
|
|||||||
shell: {
|
shell: {
|
||||||
bourbon: {
|
bourbon: {
|
||||||
command: 'bourbon install --path <%= paths.adminAssets %>/sass/modules/'
|
command: 'bourbon install --path <%= paths.adminAssets %>/sass/modules/'
|
||||||
|
},
|
||||||
|
coverage: {
|
||||||
|
command: './node_modules/mocha/bin/mocha --timeout 15000 --reporter html-cov > coverage.html ./core/test/blanket_coverage.js'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -873,6 +876,11 @@ var path = require('path'),
|
|||||||
grunt.registerTask('validate', 'Run tests and lint code', ['jslint', 'test-unit', 'test-integration', 'test-functional']);
|
grunt.registerTask('validate', 'Run tests and lint code', ['jslint', 'test-unit', 'test-integration', 'test-functional']);
|
||||||
|
|
||||||
|
|
||||||
|
// ## Coverage report for Unit and Integration Tests
|
||||||
|
|
||||||
|
grunt.registerTask('test-coverage', 'Generate unit and integration tests coverage report', ['clean:test', 'setTestEnv', 'loadConfig', 'express:test', 'shell:coverage']);
|
||||||
|
|
||||||
|
|
||||||
// ## Documentation
|
// ## Documentation
|
||||||
|
|
||||||
grunt.registerTask('docs', 'Generate Docs', ['groc']);
|
grunt.registerTask('docs', 'Generate Docs', ['groc']);
|
||||||
|
8
core/test/blanket_coverage.js
Normal file
8
core/test/blanket_coverage.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
var blanket = require("blanket")({
|
||||||
|
"pattern": ["/core/server/", "/core/client/", "/core/shared/"],
|
||||||
|
"data-cover-only": ["/core/server/", "/core/client/", "/core/shared/"]
|
||||||
|
}),
|
||||||
|
requireDir = require("require-dir");
|
||||||
|
|
||||||
|
requireDir("./unit");
|
||||||
|
requireDir("./integration");
|
@ -55,6 +55,7 @@
|
|||||||
"mysql": "2.0.0-alpha9"
|
"mysql": "2.0.0-alpha9"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"blanket": "~1.1.5",
|
||||||
"grunt": "~0.4.1",
|
"grunt": "~0.4.1",
|
||||||
"grunt-bump": "~0.0.11",
|
"grunt-bump": "~0.0.11",
|
||||||
"grunt-contrib-clean": "~0.5.0",
|
"grunt-contrib-clean": "~0.5.0",
|
||||||
@ -74,6 +75,7 @@
|
|||||||
"matchdep": "~0.3.0",
|
"matchdep": "~0.3.0",
|
||||||
"mocha": "~1.13.0",
|
"mocha": "~1.13.0",
|
||||||
"request": "~2.27.0",
|
"request": "~2.27.0",
|
||||||
|
"require-dir": "~0.1.0",
|
||||||
"should": "~2.0.2",
|
"should": "~2.0.2",
|
||||||
"sinon": "~1.7.3"
|
"sinon": "~1.7.3"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user