-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
57 lines (56 loc) · 1.45 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 webpack = require('webpack');
var path = require('path');
var isparta = require('isparta');
module.exports = function (config) {
config.set({
browsers: [ 'PhantomJS' ],
singleRun: true,
frameworks: [ 'mocha', 'es5-shim', 'chai-jquery', 'jquery-2.1.0', 'sinon-chai'],
files: [
'src/**/*_test.jsx',
'src/**/*_test.js'
],
reporters: ['dots', 'notify', 'coverage'],
preprocessors: {
'src/**/*.*': ['webpack'],
'src/*.*': ['coverage']
},
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
webpack: {
devtool: 'inline-source-map',
module: {
preLoaders: [
{
test: /\.jsx?$/,
include: path.resolve('src/'),
exclude: [
path.resolve('src/components/__tests__'),
path.resolve('src/data_operations/__tests__'),
path.resolve('src/util/__tests__')
],
loader: 'isparta'
}
],
loaders: [
{ test: /\.jsx?$/, exclude: /node_modules/, loader: "babel-loader"},
]
}
},
webpackServer: {
noInfo: true //please don't spam the console when running in karma!
},
coverageReporter: {
dir: 'coverage/',
instrumenters: { isparta: isparta },
instrumenter: {
'**/*.(js|jsx)': 'isparta'
},
reporters: [
{ type: 'lcovonly', subdir: '.'},
{ type: 'text'}
]
}
});
};