-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
36 lines (35 loc) · 1.1 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
import webpackTestConf from './webpack.test.config.babel';
module.exports = config => {
config.set({
frameworks: ['jasmine', 'sinon'],
files: [
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
{pattern: 'tests/**/*Spec.js', watched: false}
],
plugins: [
'karma-webpack',
'karma-jasmine',
'karma-sinon',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher',
'karma-coverage',
'karma-spec-reporter',
'karma-sourcemap-loader'
],
browsers: ['PhantomJS'],
preprocessors: {
'tests/**/*Spec.js': ['webpack', 'sourcemap']
},
reporters: ['spec', 'coverage'],
coverageReporter: {
dir: 'reports/coverage',
reporters: [
{type: 'html', subdir: 'html'},
{type: 'lcov', subdir: 'lcov'},
{type: 'cobertura', subdir: '.', file: 'cobertura.txt'}
]
},
webpack: webpackTestConf
});
};