-
Notifications
You must be signed in to change notification settings - Fork 5
/
coverage.js
42 lines (36 loc) · 1.13 KB
/
coverage.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
'use strict';
var babelPresetMetal = require('babel-preset-metal');
var defaultConfig = require('./index');
var isparta = require('isparta');
var karmaCoverage = require('karma-coverage');
module.exports = function (config) {
defaultConfig(config);
config.plugins.push(karmaCoverage);
config.preprocessors = {
'src/**/!(*.soy).js': ['coverage', 'commonjs'],
'src/**/*.soy.js': ['babel', 'commonjs'],
'node_modules/html2incdom/src/*.js': ['babel', 'commonjs'],
'node_modules/incremental-dom/dist/*.js': ['babel', 'commonjs'],
'node_modules/incremental-dom-string/dist/*.js': ['babel', 'commonjs'],
'node_modules/metal-soy-bundle/build/bundle.js': ['babel', 'commonjs'],
'node_modules/metal*/src/**/*.js': ['babel', 'commonjs'],
'test/**/*.js': ['babel', 'commonjs']
};
config.reporters = ['coverage', 'progress'];
config.coverageReporter = {
instrumenters: {isparta : isparta},
instrumenter: {'**/*.js': 'isparta'},
instrumenterOptions: {
isparta: {
babel: {
presets: [babelPresetMetal],
sourceMap: 'both'
}
}
},
reporters: [
{type: 'lcov', subdir: 'lcov'},
{type: 'text-summary'}
]
};
};