-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
44 lines (43 loc) · 1.14 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
var path = require('path');
module.exports = function(config) {
return config.set({
basePath: '',
frameworks: ['mocha', 'sinon-chai'],
files: ['spec/app/**'],
preprocessors: {
'spec/app/**': ['webpack', 'sourcemap']
},
webpack: {
devtool: 'source-map',
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
exclude: path.resolve(__dirname, 'node_modules')
},
{ test: /\.json$/, loader: 'json' }
],
noParse: [/\/sinon\.js/]
},
resolve: {
extensions: ["", ".js", ".jsx", ".json"],
alias: {
sinon: 'sinon/pkg/sinon'
}
},
externals: {
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true,
// See https://github.com/airbnb/enzyme/issues/47#issuecomment-207498885
'react/addons': true
}
},
webpackMiddleware: {
noInfo: true
},
plugins: ['karma-phantomjs-launcher', 'karma-mocha', 'karma-sinon-chai', 'karma-sourcemap-loader', 'karma-webpack'],
browsers: ['PhantomJS'],
autoWatch: true
});
};