This repository has been archived by the owner on Oct 13, 2019. It is now read-only.
forked from hallister/semantic-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.config.js
62 lines (61 loc) · 1.82 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
60
61
62
/* eslint-disable */
var webpack = require('webpack');
var path = require('path');
module.exports = function(config) {
config.set({
frameworks: ['mocha'],
files: [
'src/app.tests.js'
],
client: {
mocha: {
bail: true
}
},
browsers: [ 'jsdom' ],
preprocessors: {
'src/app.tests.js': ['webpack', 'sourcemap'],
'src/components/semantic-react.jsx': ['coverage']
},
reporters: [ 'mocha', 'coverage' ],
coverageReporter: {
instrumenters: { isparta : require('isparta') },
instrumenter: {
'**/*.js': 'isparta'
},
dir: 'dist/coverage',
reporters: [
{ type: 'html', subdir: 'report-html' },
{ type: 'lcov', subdir: 'report-lcov' },
{ type: 'cobertura', subdir: '.', file: 'cobertura.txt' }
]
},
webpack: {
devtool: 'inline-source-map',
debug: true,
resolve: {
extensions: ['', '.js', '.jsx', '.es6', '.json']
},
plugins: [
new webpack.IgnorePlugin(/react\/lib\/(ReactContext|ExecutionEnvironment)/)
],
module: {
preLoaders: [{
test: /\.(jsx?|es6)$/,
exclude: /node_modules/,
loader: 'eslint-loader'
}],
loaders: [{
test: /\.(jsx?|es6)$/,
exclude: /node_modules/,
loader: 'babel'
},{
test: /\.json$/,
loader: 'json'
}]
}
},
webpackMiddleware: { noInfo: true }
});
}
/* eslint-enable */