-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathkarma.conf.js
67 lines (63 loc) · 1.46 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
const path = require('path');
const webpackConf = require('./webpack.config.js');
webpackConf.externals = {
cheerio: 'window',
'react/addons': true,
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true,
};
webpackConf.output = {
path: path.join(__dirname, '/dist/'),
};
delete webpackConf.entry;
module.exports = function (config) {
config.set({
autoWatch: true,
browserNoActivityTimeout: 60000,
browsers: ['CustomChromeHeadless'],
captureTimeout: 60000,
client: {
mocha: {
timeout: 4000
},
},
colors: true,
concurrency: Infinity,
customLaunchers: {
CustomChromeHeadless: {
base: 'ChromeHeadless',
flags: [
'--headless',
'--disable-gpu',
'--no-sandbox',
'--remote-debugging-port=9222',
],
},
},
files: [
'loadtests.js',
],
frameworks: ['webpack', 'mocha', 'chai', 'sinon', 'intl-shim'],
logLevel: config.LOG_INFO,
plugins: [
'karma-webpack',
'karma-sourcemap-loader',
'karma-mocha',
'karma-mocha-reporter',
'karma-chai',
'karma-sinon',
'karma-intl-shim',
'karma-chrome-launcher',
'karma-coverage',
],
preprocessors: {
'loadtests.js': ['webpack', 'sourcemap'],
},
reporters: [ 'mocha' ],
singleRun: true,
webpack: webpackConf,
webpackMiddleware: {
noInfo: true // We don't want webpack output
}
});
};