You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
const webpackConfig = {
|
|
mode: 'production',
|
|
module: {
|
|
rules: [{
|
|
test: /\.(js|ts)$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader'
|
|
}]
|
|
},
|
|
resolve: {
|
|
extensions: ['.js', '.ts']
|
|
}
|
|
};
|
|
|
|
module.exports = function (config) {
|
|
config.set({
|
|
basePath: '',
|
|
frameworks: ['mocha', 'chai', 'sinon'],
|
|
files: [
|
|
{ pattern: 'test/integration/**/*.ts' },
|
|
{ pattern: 'test/fixtures/**/*.*', included: false }
|
|
],
|
|
preprocessors: {
|
|
'**/*.ts': ['webpack']
|
|
},
|
|
webpack: webpackConfig,
|
|
plugins: [
|
|
'karma-chrome-launcher',
|
|
'karma-mocha',
|
|
'karma-chai',
|
|
'karma-sinon',
|
|
'karma-webpack'
|
|
],
|
|
reporters: ['progress'],
|
|
port: 9876,
|
|
colors: true,
|
|
logLevel: config.LOG_INFO, // LOG_DEBUG
|
|
autoWatch: true,
|
|
customLaunchers: {
|
|
ChromeDebugging: {
|
|
base: 'Chrome',
|
|
flags: ['--remote-debugging-port=9333'],
|
|
debug: true
|
|
}
|
|
},
|
|
browsers: ['ChromeDebugging'],
|
|
singleRun: false
|
|
});
|
|
};
|