-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathkarma-coverage.conf.js
45 lines (37 loc) · 1.14 KB
/
karma-coverage.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
var isparta = require('isparta');
var metal = require('gulp-metal');
var babelOptions = {
resolveModuleSource: metal.renameAlias,
sourceMap: 'both'
};
module.exports = function (config) {
config.set({
frameworks: ['mocha', 'chai', 'sinon', 'source-map-support', 'commonjs'],
files: [
'bower_components/metal/**/*.js',
'bower_components/metal-promise/**/*.js',
'bower_components/soyutils/soyutils.js',
'src/**/*.js',
'test/**/*.js'
],
preprocessors: {
'bower_components/metal/**/*.js': ['babel', 'commonjs'],
'bower_components/metal-promise/**/*.js': ['babel', 'commonjs'],
'src/**/*.js': ['coverage', 'commonjs'],
'test/**/*.js': ['babel', 'commonjs']
},
browsers: ['Chrome'],
reporters: ['coverage', 'progress'],
babelPreprocessor: {options: babelOptions},
coverageReporter: {
instrumenters: {isparta : isparta},
instrumenter: {'**/*.js': 'isparta'},
instrumenterOptions: {isparta: {babel: babelOptions}},
reporters: [
{type: 'html'},
{type: 'lcov', subdir: 'lcov'},
{type: 'text-summary'}
]
}
});
};