-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathkarma.conf.js
56 lines (47 loc) · 1.27 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
module.exports = function(config) {
config.set({
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha'],
// files to watch
files: [
'tests/*-test.js'
],
// processors per file
preprocessors: {
'tests/*-test.js': ['webpack']
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha'],
// define browsers
customLaunchers: {
Chrome_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// webpack configuration
webpack: require('./webpack.config.js'),
// webpack-dev-middleware config
webpackMiddleware: {
stats: 'errors-only'
},
// enable our plugins
plugins: [
require('karma-mocha'),
require('karma-webpack'),
require('karma-mocha-reporter'),
require('karma-chrome-launcher')
]
});
// CI config
if (process.env.TRAVIS || process.env.CI) {
config.singleRun = true;
config.browsers = ['Chrome_ci'];
}
};