-
Notifications
You must be signed in to change notification settings - Fork 58
/
karma.config.js
59 lines (46 loc) · 1.06 KB
/
karma.config.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
module.exports = function(config) {
var browsers = ['PhantomJS'];
/*if (process.env.TRAVIS) {
browsers.push('Chrome_Travis');
} else {
browsers.push('Chrome');
}*/
config.set({
singleRun: true,
browsers: browsers,
customLaunchers: {
Chrome_Travis: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
frameworks: [
'jasmine'
],
files: [
'./src/index.spec.js'
],
reporters: ['progress', 'coverage'],
preprocessors: {
'./src/index.spec.js': ['coverage', 'webpack', 'sourcemap'],
},
webpack: require('./webpack-test.config'),
webpackMiddleware: {
stats: 'errors-only'
},
coverageReporter: {
type: 'json',
subdir: '.',
dir: 'build/coverage/',
file: 'coverage.json'
},
plugins: [
require('karma-jasmine'),
require('karma-coverage'),
require('karma-phantomjs-launcher'),
require('karma-chrome-launcher'),
require('karma-webpack'),
require('karma-sourcemap-loader')
]
});
};