-
Notifications
You must be signed in to change notification settings - Fork 22
/
karma.conf.js
61 lines (52 loc) · 1.28 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
const webpack = require('karma-webpack');
const webpackConfig = require('./webpack.config');
webpackConfig.externals = {
'cheerio': 'window', // eslint-disable-line
'react/addons': true,
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true,
};
module.exports = (config) => {
config.set({
basePath: '',
files: [
'test/*.spec.js',
],
// list of files to exclude
exclude: [
],
frameworks: ['mocha'],
plugins: [
webpack,
'karma-chrome-launcher',
'karma-safari-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher',
'karma-mocha',
'karma-spec-reporter',
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/*.spec.js': ['webpack'],
},
reporters: ['spec'],
browsers: ['Chrome', 'Safari', 'Firefox'],
// web server port
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
singleRun: true,
concurrency: Infinity,
webpack: webpackConfig,
webpackMiddleware: {
noInfo: false,
stats: {
assets: false,
chunks: false,
modules: false,
},
},
});
};