-
Notifications
You must be signed in to change notification settings - Fork 5
/
karma.conf.js
45 lines (36 loc) · 965 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
39
40
41
42
43
44
45
'use strict';
var isparta = require('isparta');
var babelOptions = {
presets: ['es2015'],
sourceMap: 'both'
};
module.exports = function (config) {
config.set({
frameworks: ['mocha', 'chai', 'source-map-support', 'commonjs'],
files: [
'node_modules/incremental-dom/dist/incremental-dom.js',
'src/*.js',
'test/*.js'
],
preprocessors: {
'src/HTMLParser.js': ['commonjs'],
'src/unescape.js': ['babel', 'commonjs'],
'src/!(HTMLParser|unescape).js': ['coverage', 'commonjs'],
'test/*.js': ['babel', 'commonjs']
},
browsers: ['Chrome'],
babelPreprocessor: {options: babelOptions},
reporters: ['coverage', 'progress'],
coverageReporter: {
instrumenters: {isparta : isparta},
instrumenter: {'**/*.js': 'isparta'},
instrumenterOptions: {
isparta: {babel: babelOptions}
},
reporters: [
{type: 'lcov', subdir: 'lcov'},
{type: 'text-summary'}
]
}
});
};