-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.config.js
47 lines (41 loc) · 1.08 KB
/
karma.config.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
var Path = require('path');
var webpackConfig = require('./webpack.config.js');
webpackConfig.node = { fs: 'empty' };
webpackConfig.devtool = 'inline-source-map';
module.exports = function (config) {
var bundlePath = Path.join(
__dirname, 'spec', 'runner.js');
var karmaConfig = {
autoWatch: false,
basePath: '',
browsers: ['Chrome'],
client: { captureConsole: true },
files: [bundlePath],
frameworks: ['jasmine', 'source-map-support'],
reporters: ['progress'],
singleRun: true,
webpack: webpackConfig,
webpackMiddleware: {
stats: {
colors: true,
hash: false,
version: false,
timings: false,
assets: false,
chunks: false,
modules: false,
reasons: false,
children: false,
source: false,
errors: true,
errorDetails: true,
warnings: false,
publicPath: false
}
}
};
var preprocessorsConfig = {};
preprocessorsConfig[bundlePath] = ['webpack'];
karmaConfig.preprocessors = preprocessorsConfig;
config.set(karmaConfig);
};