-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathkarma.conf.js
38 lines (37 loc) · 903 Bytes
/
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
module.exports = function(config) {
var reporters = ['progress', 'coverage'];
if (process.env.TRAVIS) {
reporters.push('coveralls');
}
config.set({
frameworks: ['jasmine'],
browsers: ['PhantomJS'],
singleRun: true,
files: ['test/suite.js'],
preprocessors: {
'test/suite.js': ['webpack', 'sourcemap']
},
reporters: reporters,
coverageReporter: {
dir: 'coverage',
reporters: [
{ type: 'html', subdir: 'html' },
{ type: 'lcov', subdir: '.' },
{ type: 'text-summary' }
]
},
webpack: {
module: {
rules: [{
test: /\.js$/,
exclude: [/node_modules/],
loader: 'babel-loader',
options: {
plugins: ['istanbul']
}
}]
},
devtool: 'inline-source-map'
}
})
}