-
Notifications
You must be signed in to change notification settings - Fork 3
/
karma.conf.js
57 lines (55 loc) · 1.32 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
var path = require('path');
var reporters = ['progress', 'coverage-istanbul'];
var browsers = process.env.TRAVIS ? ['Chrome_travis_ci'] : ['ChromeHeadless'];
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
'test/index.spec.js'
],
preprocessors: {
'test/index.spec.js': 'webpack'
},
webpack: {
devtool: 'inline-source-map',
module: {
loaders: [{
test: /\.js$/,
include: [
path.resolve(__dirname, 'src/'),
path.resolve(__dirname, 'test/')
],
loader: 'babel-loader'
},
{
test: /\.jsx?$/,
use: {
loader: 'istanbul-instrumenter-loader',
options: { esModules: true }
},
enforce: 'post',
exclude: /node_modules|\.spec\.js$/,
}
]
},
resolve: {
extensions: ['.js']
}
},
reporters: reporters,
coverageIstanbulReporter: {
reports: ['html', 'lcov'],
dir: path.join(__dirname, 'coverage')
},
port: 9876,
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
browsers: browsers,
captureTimeout: 10 * 60 * 1000
})
};