mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-06 00:14:03 +01:00
Merge pull request #2013 from nnnick/fix-coverage-report
Fix coverage report
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.11"
|
||||
- "0.10"
|
||||
- "5.6"
|
||||
- "4.3"
|
||||
|
||||
before_install:
|
||||
- "export CHROME_BIN=chromium-browser"
|
||||
@@ -13,6 +13,8 @@ before_script:
|
||||
|
||||
script:
|
||||
- gulp test
|
||||
- gulp coverage
|
||||
- cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
|
||||
|
||||
notifications:
|
||||
slack: chartjs:pcfCZR6ugg5TEcaLtmIfQYuA
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Chart.js
|
||||
|
||||
[](https://travis-ci.org/nnnick/Chart.js) [](https://codeclimate.com/github/nnnick/Chart.js)
|
||||
[](https://travis-ci.org/nnnick/Chart.js) [](https://codeclimate.com/github/nnnick/Chart.js)[](https://coveralls.io/r/nnncik/Chart.js?branch=v2.0-dev)
|
||||
|
||||
|
||||
|
||||
*Simple HTML5 Charts using the canvas element* [chartjs.org](http://www.chartjs.org)
|
||||
|
||||
@@ -133,7 +133,7 @@ function validHTMLTask() {
|
||||
|
||||
|
||||
function unittestTask() {
|
||||
var files = ['./dist/Chart.bundle.js']
|
||||
var files = ['./src/**/*.js'];
|
||||
Array.prototype.unshift.apply(files, preTestFiles);
|
||||
Array.prototype.push.apply(files, testFiles);
|
||||
|
||||
@@ -145,7 +145,7 @@ function unittestTask() {
|
||||
}
|
||||
|
||||
function unittestWatchTask() {
|
||||
var files = ['./dist/Chart.bundle.js']
|
||||
var files = ['./src/**/*.js'];
|
||||
Array.prototype.unshift.apply(files, preTestFiles);
|
||||
Array.prototype.push.apply(files, testFiles);
|
||||
|
||||
@@ -157,7 +157,7 @@ function unittestWatchTask() {
|
||||
}
|
||||
|
||||
function coverageTask() {
|
||||
var files = ['./dist/Chart.bundle.js']
|
||||
var files = ['./src/**/*.js'];
|
||||
Array.prototype.unshift.apply(files, preTestFiles);
|
||||
Array.prototype.push.apply(files, testFiles);
|
||||
|
||||
|
||||
@@ -7,8 +7,14 @@ module.exports = function(config) {
|
||||
flags: ['--no-sandbox']
|
||||
}
|
||||
},
|
||||
frameworks: ['jasmine'],
|
||||
frameworks: ['browserify', 'jasmine'],
|
||||
reporters: ['progress', 'html'],
|
||||
preprocessors: {
|
||||
'src/**/*.js': ['browserify']
|
||||
},
|
||||
browserify: {
|
||||
debug: true
|
||||
}
|
||||
};
|
||||
|
||||
if (process.env.TRAVIS) {
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
browsers: ['Chrome', 'Firefox'],
|
||||
frameworks: ['jasmine'],
|
||||
frameworks: ['browserify', 'jasmine'],
|
||||
reporters: ['progress', 'html'],
|
||||
|
||||
preprocessors: {
|
||||
'src/**/*.js': ['browserify']
|
||||
},
|
||||
browserify: {
|
||||
debug: true
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -1,18 +1,43 @@
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
browsers: ['Chrome', 'Firefox'],
|
||||
var configuration = {
|
||||
browsers: ['Firefox'],
|
||||
|
||||
coverageReporter: {
|
||||
type: 'html',
|
||||
dir: 'coverage/'
|
||||
},
|
||||
|
||||
frameworks: ['jasmine'],
|
||||
frameworks: ['browserify', 'jasmine'],
|
||||
|
||||
preprocessors: {
|
||||
'src/**/*.js': ['coverage']
|
||||
'src/**/*.js': ['browserify']
|
||||
},
|
||||
browserify: {
|
||||
debug: true,
|
||||
transform: [['browserify-istanbul', {
|
||||
instrumenterConfig: {
|
||||
embed: true
|
||||
}
|
||||
}]]
|
||||
},
|
||||
|
||||
reporters: ['progress', 'coverage'],
|
||||
});
|
||||
coverageReporter: {
|
||||
dir: 'coverage/',
|
||||
reporters: [
|
||||
{ type: 'html', subdir: 'report-html' },
|
||||
{ type: 'lcovonly', subdir: '.', file: 'lcov.info' }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
// If on the CI, use the CI chrome launcher
|
||||
if (process.env.TRAVIS) {
|
||||
configuration.browsers.push('Chrome_travis_ci');
|
||||
configuration.customLaunchers = {
|
||||
Chrome_travis_ci: {
|
||||
base: 'Chrome',
|
||||
flags: ['--no-sandbox']
|
||||
}
|
||||
};
|
||||
} else {
|
||||
configuration.browsers.push('Chrome');
|
||||
}
|
||||
|
||||
config.set(configuration);
|
||||
};
|
||||
@@ -10,6 +10,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^13.0.0",
|
||||
"browserify-istanbul": "^0.2.1",
|
||||
"coveralls": "^2.11.6",
|
||||
"gulp": "3.9.x",
|
||||
"gulp-concat": "~2.1.x",
|
||||
"gulp-connect": "~2.0.5",
|
||||
@@ -26,7 +28,9 @@
|
||||
"jasmine": "^2.3.2",
|
||||
"jasmine-core": "^2.3.4",
|
||||
"jquery": "^2.1.4",
|
||||
"jshint-stylish": "~2.1.0",
|
||||
"karma": "^0.12.37",
|
||||
"karma-browserify": "^5.0.1",
|
||||
"karma-chrome-launcher": "^0.2.0",
|
||||
"karma-coverage": "^0.5.1",
|
||||
"karma-firefox-launcher": "^0.1.6",
|
||||
@@ -34,8 +38,7 @@
|
||||
"karma-jasmine-html-reporter": "^0.1.8",
|
||||
"merge-stream": "^1.0.0",
|
||||
"semver": "^3.0.1",
|
||||
"vinyl-source-stream": "^1.1.0",
|
||||
"jshint-stylish": "~2.1.0"
|
||||
"vinyl-source-stream": "^1.1.0"
|
||||
},
|
||||
"spm": {
|
||||
"main": "Chart.js"
|
||||
|
||||
Reference in New Issue
Block a user