1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-02 09:11:54 +02:00

@yanglinz enabled local coverage reporting with 'npm test --coverage'. closes #3539

This commit is contained in:
Yanglin Zhao 2016-08-17 18:32:48 -04:00 committed by Gary Katsevman
parent f787cbad18
commit c859d8e104

View File

@ -87,10 +87,16 @@ module.exports = function(config) {
}
};
if (process.env.TRAVIS) {
// Coverage reporting
// Coverage is enabled by passing the flag --coverage to npm test
var coverageFlag = process.env.npm_config_coverage;
var reportCoverage = process.env.TRAVIS || coverageFlag;
if (reportCoverage) {
settings.browserify.transform.push('browserify-istanbul');
settings.reporters.push('coverage');
}
if (process.env.TRAVIS) {
if (process.env.BROWSER_STACK_USERNAME) {
settings.browsers = [
'chrome_bs',