element-ui/test/unit/karma.conf.js

32 lines
671 B
Vue
Raw Permalink Normal View History

2021-06-07 11:56:04 +08:00
const webpackConfig = require('../../build/webpack.test');
module.exports = function(config) {
const configuration = {
browsers: ['ChromeHeadless'],
frameworks: ['mocha', 'sinon-chai'],
reporters: ['spec', 'coverage'],
files: ['./index.js'],
preprocessors: {
'./index.js': ['webpack', 'sourcemap']
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
},
coverageReporter: {
dir: './coverage',
reporters: [
{ type: 'lcov', subdir: '.' },
{ type: 'text-summary' }
]
},
client: {
mocha: {
timeout: 4000
}
}
};
config.set(configuration);
};