60 lines
1.4 KiB
JavaScript
60 lines
1.4 KiB
JavaScript
module.exports = function(config) {
|
|
const webpackConfig = {};
|
|
config.set({
|
|
basePath: '.',
|
|
|
|
// frameworks to use
|
|
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
|
frameworks: ['jasmine'],
|
|
|
|
// list of files / patterns to load in the browser
|
|
files: [
|
|
{ pattern: 'build/test/test.js', watched: false}
|
|
],
|
|
|
|
// list of files to exclude
|
|
exclude: [],
|
|
|
|
// preprocess matching files before serving them to the browser
|
|
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
|
preprocessors: {
|
|
'build/test/test.js': ['webpack']
|
|
},
|
|
|
|
reporters: ['dots'],
|
|
|
|
webpack: webpackConfig,
|
|
|
|
webpackMiddleware: {
|
|
stats: 'errors-only'
|
|
},
|
|
|
|
plugins: [
|
|
require('karma-jasmine'),
|
|
require('karma-chrome-launcher'),
|
|
require('karma-webpack')
|
|
],
|
|
|
|
// web server port
|
|
port: 9876,
|
|
|
|
// enable / disable colors in the output (reporters and logs)
|
|
colors: true,
|
|
|
|
// level of logging
|
|
logLevel:config.LOG_INFO,
|
|
|
|
// enable / disable watching file and executing tests whenever any file changes
|
|
autoWatch: true,
|
|
|
|
// start these browsers
|
|
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
|
// browsers: ['PhantomJS'],
|
|
browsers: ['Chrome'],
|
|
|
|
// Concurrency level
|
|
// how many browser should be started simultaneous
|
|
concurrency: Infinity
|
|
});
|
|
};
|