-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
50 lines (47 loc) · 1.02 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
'use strict';
import _ from 'lodash';
let config = require('./config');
module.exports = function(karma) {
karma.set({
basePath: '.',
frameworks: ['mocha'],
files: [
'src/assets/js/vendor.js',
'test/**/*-test.js'
],
preprocessors: {
'src/assets/js/vendor.js': ['webpack', 'sourcemap'],
'test/**/*-test.js': ['webpack', 'sourcemap']
},
reporters: ['dots'],
port: 9877,
colors: true,
autoWatch: true,
browsers: [/*'Chrome', 'Firefox', */'PhantomJS'],
webpack: _.merge(config.webpack, {
devtool: 'inline-source-map'
}),
webpackMiddleware: {
noInfo: true
},
plugins: [
'karma-webpack',
'karma-mocha',
'karma-coverage',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher',
'karma-sourcemap-loader'
],
coverageReporter: {
type : 'html',
dir : 'coverage/'
},
client: {
mocha: {
reporter: 'html',
ui: 'tdd'
}
}
});
};