Merge "Enable coverage reporting."

This commit is contained in:
Jenkins 2015-12-03 20:47:20 +00:00 committed by Gerrit Code Review
commit 91170d4b11
3 changed files with 21 additions and 2 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
.idea
node_modules
build
cover
app/js/templates.js
*.py[cod]

View File

@ -118,8 +118,18 @@ To test javascript code, run::
npm test
This will execute both unit and end-to-end tests, and will write coverage
reports to :code:`./cover`. To indvidually run unit tests and generate coverage
reports, run::
npm run unit
Similarly, to run only end-to-end tests, run::
npm run e2e
Alternatively, you can start the karma server and have it watch for changes in
your files so that tests are run every time they change, allowing for much
your files so that unit tests are run every time they change, allowing for much
faster feedback::
./node_modules/karma/bin/karma start test/karma.conf.js --no-single-run

View File

@ -23,7 +23,7 @@ module.exports = function(config) {
'app/js/**/*.js': ['browserify', 'babel', 'coverage']
},
reporters: ['spec'],
reporters: ['spec', 'coverage'],
port: 9876,
@ -57,6 +57,14 @@ module.exports = function(config) {
]
},
coverageReporter: {
type: 'html',
dir: 'cover',
instrumenterOptions: {
istanbul: {noCompact: true}
}
},
proxies: {
'/': 'http://localhost:9876/'
},