forked from mu29/react-radio-buttons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
45 lines (39 loc) · 1.23 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
/* karma.conf.js */
module.exports = function karmaConfig(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// frameworks to use
frameworks: ['jasmine'],
files: ['test/*.js'],
preprocessors: {
// add webpack as preprocessor
'test/*.js': ['webpack', 'sourcemap']
},
webpack: { // kind of a copy of your webpack config
devtool: 'inline-source-map', // just do inline source maps instead of the default
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /\/node_modules\//,
loader: 'babel-loader',
}
]
},
externals: {
cheerio: 'window',
'react/addons': true,
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true
}
},
reporters: ['nyan'],
plugins: [
'karma-jasmine',
'karma-sourcemap-loader',
'karma-nyan-reporter',
require('karma-webpack')
]
});
};