mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
c216c0af76
`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.
34 lines
668 B
JavaScript
34 lines
668 B
JavaScript
/* eslint camelcase: 0 */
|
|
|
|
module.exports = function(karma) {
|
|
var config = {
|
|
browsers: ['Firefox'],
|
|
frameworks: ['browserify', 'jasmine'],
|
|
reporters: ['progress', 'kjhtml'],
|
|
|
|
preprocessors: {
|
|
'./test/jasmine.index.js': ['browserify'],
|
|
'./src/**/*.js': ['browserify']
|
|
},
|
|
|
|
browserify: {
|
|
debug: true
|
|
}
|
|
};
|
|
|
|
// https://swizec.com/blog/how-to-run-javascript-tests-in-chrome-on-travis/swizec/6647
|
|
if (process.env.TRAVIS) {
|
|
config.browsers.push('chrome_travis_ci');
|
|
config.customLaunchers = {
|
|
chrome_travis_ci: {
|
|
base: 'Chrome',
|
|
flags: ['--no-sandbox']
|
|
}
|
|
};
|
|
} else {
|
|
config.browsers.push('Chrome');
|
|
}
|
|
|
|
karma.set(config);
|
|
};
|