-
Notifications
You must be signed in to change notification settings - Fork 20
/
karma.conf.js
62 lines (49 loc) · 1.18 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
61
62
var webpackConfig = require('./webpack.config')
var config = {
frameworks: ['mocha', 'effroi'],
preprocessors: {
'tests/index.js': ['webpack', 'sourcemap']
},
files: [
'tests/index.js'
],
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['progress', 'coverage'],
// this watcher watches when bundled files are updated
autoWatch: true,
webpack: Object.assign(webpackConfig, {
entry: undefined,
// this watcher watches when source files are updated
watch: true,
devtool: 'inline-source-map',
module: Object.assign(webpackConfig.module, {
postLoaders: [{
test: /\.js/,
exclude: /(test|node_modules)/,
loader: 'istanbul-instrumenter'
}]
})
}),
webpackServer: {
noInfo: true
},
client: {
useIframe: true,
captureConsole: true,
mocha: {
ui: 'qunit'
}
},
browsers: [process.env.TRAVIS ? 'Firefox' : 'Chrome'],
browserNoActivityTimeout: 30000,
coverageReporter: {
reporters: [
{type: 'html', dir: 'coverage/'},
{type: 'text-summary'}
]
}
}
module.exports = function (c) {
c.set(config)
}
module.exports.config = config