forked from euler-ui/euler-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
79 lines (79 loc) · 1.8 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
var webpack = require('webpack');
var babelMoreOptions = {
presets: ['react', 'es2015']
};
module.exports = function(config) {
config.set({
browsers: ['PhantomJS'],
singleRun: false,
frameworks: ['mocha', 'sinon', 'chai'],
files: [
'test/index.js'
],
proxies: {
},
preprocessors: {
'test/index.js': ['webpack', 'sourcemap']
},
reporters: ['progress', 'coverage', 'coveralls'],
coverageReporter: {
type: 'lcov',
dir: 'coverage/'
},
webpack: {
devtool: 'inline-source-map',
isparta: {
embedSource: true,
noAutoWrap: true,
// these babel options will be passed only to isparta and not to babel-loader
babel: {
presets: ['es2015', 'react']
}
},
module: {
preLoaders: [
{
test: /\.js$/,
// loader: "isparta",
loader: 'babel',
exclude: /node_modules/,
query: {
presets: ['react', 'es2015']
},
include: __dirname
},
{
test: /src\/.*\.js$/,
loader: "isparta",
// loader: 'babel',
exclude: /node_modules/,
query: {
presets: ['react', 'es2015']
},
include: __dirname
}
],
loaders: [
{
test: /\.css$/,
loader: "style-loader!css-loader"
}, {
test: /\.(png|jpg|svg)$/,
loader: 'url-loader?limit=8192'
}, {
test: /\.json$/,
loader: 'json-loader'
}
],
noParse: /request\/server\.js/
},
node: {
fs: "empty"
},
watch: true
},
webpackMiddleware: {
noInfo: true
}
});
};