-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathkarma.conf.js
48 lines (47 loc) · 1.33 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
// convert args to named args
var namedArgs = process.argv.reduce(function (o, v) {
o[v] = true;
return o;
}, {});
module.exports = function (config) {
config.set({
basePath: '',
files: [
'src/test/**/*.js',
{
pattern: 'src/test/fixtures/**/*.html',
watched: true,
included: false,
served: true
}
],
frameworks: ['jasmine-jquery', 'jasmine'],
browsers: ['Chrome'],
preprocessors: {'./src/**/*.js': ['webpack']},
reporters: '--ci' in namedArgs ? ['progress', 'junit', 'coverage'] : ['progress'],
coverageReporter: {
dir: 'reports',
reporters: [
{ type: 'lcov', subdir: 'report-lcov' }
]
},
plugins: [
'karma-chrome-launcher',
'karma-jasmine',
'karma-jasmine-jquery',
'karma-junit-reporter',
'karma-coverage',
require("karma-webpack")
],
webpackMiddleware: {
// webpack-dev-middleware configuration
// i. e.
noInfo: true
},
junitReporter: {
outputDir: 'test_out',
suite: 'unit'
},
webpack: require('./webpack.test.config.js')
});
};