forked from krux/postscribe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma-ci.config.babel.js
45 lines (37 loc) · 935 Bytes
/
karma-ci.config.babel.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
/* eslint-env node */
import path from 'path';
import isparta from 'isparta';
import pkg from '../package.json';
import baseConfig from './karma-base.config.babel.js';
module.exports = config => {
baseConfig.webpack.module.preLoaders = [
{
test: /\.js$/,
loader: 'isparta',
include: path.resolve('src/')
}
];
baseConfig.coverageReporter = {
// configure the reporter to use isparta for JavaScript coverage
instrumenters: {
isparta
},
instrumenter: {
'src/**/*.js': 'isparta'
},
instrumenterOptions: {
isparta: {
babel: pkg.babel,
noAutoWrap: true
}
},
dir: '../build/test-reports/coverage/',
reporters: [
{type: 'text-summary'},
{type: 'text'},
{type: 'lcov', dir: '../build/test-reports/coverage/'}
]
};
baseConfig.reporters = ['mocha', 'coverage', 'coveralls'];
config.set(baseConfig);
};