-
Notifications
You must be signed in to change notification settings - Fork 202
/
karma.conf.js
59 lines (45 loc) · 1.1 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
const webpackConfig = require('./webpack.config.js');
delete webpackConfig.entry;
delete webpackConfig.externals;
delete webpackConfig.output;
delete webpackConfig.plugins;
webpackConfig.devtool = 'inline-source-map';
module.exports = function(config) {
config.set({
browserConsoleLogOptions: {
level: 'error',
format: '%b %T: %m',
terminal: false
},
browsers: ['PhantomJS', 'Chrome'],
client: {
mocha: {
reporter: 'html'
}
},
files: [
{ pattern: 'lib/tests/*\\.test\\.js', watched: false }
],
frameworks: ['babel-polyfill', 'mocha', 'expect'],
logLevel: config.LOG_ERROR,
plugins: [
'karma-babel-polyfill',
'karma-chrome-launcher',
'karma-expect',
'karma-mocha',
'karma-phantomjs-launcher',
'karma-sourcemap-loader',
'karma-webpack'
],
preprocessors: {
'lib/tests/*\\.test\\.js': ['webpack', 'sourcemap']
},
reporters: ['dots'],
singleRun: true,
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true,
stats: 'errors-only'
}
});
};