File size: 1,427 Bytes
271613e 4265b61 271613e 4265b61 271613e 2c71bd0 271613e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
const webpackCfg = require('./build/webpack.dev')
webpackCfg.devtool = 'inline-source-map'
webpackCfg.module.rules.push({
test: /\.js$/,
exclude: /node_modules|lib\/util\.js/,
loader: '@jsdevtools/coverage-istanbul-loader',
enforce: 'post',
options: {
esModules: true,
},
})
/*
'src/index.js',
'test/init.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
'test/util.js',
'test/console.js',
'test/elements.js',
'test/info.js',
'test/network.js',
'test/resources.js',
'test/snippets.js',
'test/sources.js',
'test/settings.js',
*/
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jquery-1.8.3'],
files: [
'test/eruda.js',
],
plugins: [
'karma-jasmine',
'karma-jquery',
'karma-chrome-launcher',
'karma-webpack',
'karma-sourcemap-loader',
'karma-coverage-istanbul-reporter',
],
webpackServer: {
stats: 'errors-only',
},
preprocessors: {
'src/index.js': ['webpack', 'sourcemap'],
},
webpack: webpackCfg,
coverageIstanbulReporter: {
reports: ['html', 'lcovonly', 'text', 'text-summary'],
},
reporters: ['progress', 'coverage-istanbul'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadless'],
singleRun: true,
concurrency: Infinity,
})
}
|