-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathkarma.conf.js
More file actions
63 lines (60 loc) · 1.4 KB
/
karma.conf.js
File metadata and controls
63 lines (60 loc) · 1.4 KB
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
var webpack = require('webpack'),
webpackConfig = require('./webpack/webpack.config.js');
configFile = require('./config.js');
module.exports = function(config) {
const preprocessors = {};
preprocessors[configFile.webpack_test_context] = ['webpack'];
config.set({
basePath: '',
browsers: ['PhantomJS'],
singleRun: true,
files: [
configFile.babel_polyfill,
configFile.webpack_test_context,
{
pattern: configFile.json_path,
served: true,
included: false
}
],
frameworks: [
'mocha',
'chai'
],
preprocessors,
babelPreprocessor: {
options: {
presets: ['es2015']
},
},
plugins: [
'karma-chai',
'karma-coverage',
'karma-coveralls',
'karma-mocha',
'karma-mocha-reporter',
'karma-phantomjs-launcher',
'karma-webpack'
],
proxies: {
'/src/static/json': '/base/src/static/json/'
},
reporters: [
'mocha',
'progress',
'coverage',
'coveralls'
],
coverageReporter: {
dir: configFile.code_coverage_dir,
reporters: [
{type: 'html', subdir: configFile.code_coverage_sub_dir},
{type: 'lcov', subdir: configFile.code_coverage_lcov_sub_dir}
]
},
webpack: webpackConfig,
webpackServer: {
noInfo: true // don't spam console when running app in karma
}
})
}