mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
`karma.conf.ci.js` has been merged into `karma.conf.js` for local testing consistency: `gulp unittestWatch` has been replaced by `gulp unittest --watch` and thus use exactly the same config file. Upgrade to latest jasmine and karma packages and remove deprecated `gulp-karma` dependency (directly use `karma.Server` in gulp). Split `test/mockContext.js` into smaller `test/jasmine.*` modules to make easier unit tests maintenance and finally, move all `*.test.js` files under the `test/specs` folder.
44 lines
906 B
JavaScript
44 lines
906 B
JavaScript
module.exports = function(config) {
|
|
var configuration = {
|
|
browsers: ['Firefox'],
|
|
frameworks: ['browserify', 'jasmine'],
|
|
reporters: ['progress', 'coverage'],
|
|
|
|
preprocessors: {
|
|
'./test/jasmine.index.js': ['browserify'],
|
|
'./src/**/*.js': ['browserify']
|
|
},
|
|
|
|
browserify: {
|
|
debug: true,
|
|
transform: [['browserify-istanbul', {
|
|
instrumenterConfig: {
|
|
embed: true
|
|
}
|
|
}]]
|
|
},
|
|
|
|
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);
|
|
}; |