forked from nymag/medium-editor-phrase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
60 lines (57 loc) · 1.22 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const istanbul = require('browserify-istanbul'),
babelify = require('babelify');
var settings = {
autoWatch: false,
colors: true,
singleRun: true,
browserify: {
transform: [
babelify.configure({
presets: ['es2015-script']
}),
istanbul({
ignore: [
'**/*.test.js',
'**/dist/**'
],
defaultIgnore: true
})
]
},
coverageReporter: {
type: 'lcovonly',
dir: 'coverage/',
includeAllSources: true,
watermarks: {
statements: [50, 75],
functions: [50, 75],
branches: [50, 75],
lines: [50, 75]
}
},
reporters: ['spec', 'coverage'],
files: ['src/*.js'],
frameworks: ['mocha', 'chai', 'browserify'],
preprocessors: {
'src/*.js': ['browserify']
},
plugins: [
'karma-coverage',
'karma-coveralls',
'karma-spec-reporter',
'karma-browserify',
'karma-browserstack-launcher',
'karma-chai',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-mocha',
'karma-safari-launcher'
]
};
module.exports = function (karma) {
karma.set(Object.assign(settings, {
browsers: ['Chrome']
}));
};
module.exports.files = settings.files;
module.exports.settings = settings;