forked from rsuite/rsuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
46 lines (43 loc) · 986 Bytes
/
karma.conf.js
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
var webpackConfig = {
output: {
pathinfo: true
},
module: {
loaders: [{
test: /\.js$/,
loaders: [
'babel?babelrc'
],
exclude: /node_modules/
}]
},
devtool: 'eval'
};
module.exports = function (config) {
const { env } = process;
config.set({
basePath: '',
files: ['test/index.js'],
frameworks: [
'mocha',
'sinon-chai'
],
colors: true,
reporters: ['mocha'],
logLevel: config.LOG_INFO,
preprocessors: {
'test/index.js': ['webpack'],
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
},
browsers: env.BROWSER ? env.BROWSER.split(',') : ['Chrome'],
customLaunchers: {
ChromeCi: {
base: 'Chrome',
flags: ['--no-sandbox'],
},
}
});
};