-
Notifications
You must be signed in to change notification settings - Fork 1
/
karma.conf.js
41 lines (41 loc) · 949 Bytes
/
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
module.exports = function(config) {
config.set({
frameworks: ['mocha', 'chai'],
files: [
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
'./node_modules/babel-polyfill/dist/polyfill.js',
'src/test/**/*.spec.*',
],
webpack: {
module: {
preLoaders: [
{
test: /\.jsx$|\.js$/,
loader: 'eslint-loader',
exclude: /node_modules/,
},
],
loaders: [{
test: /\.jsx$|\.js$/,
exclude: /node_modules/,
loaders: ['babel'],
}],
},
resolve: {
extensions: ['', '.js', '.jsx'],
},
},
preprocessors: {
'src/test/**/*.spec.js': ['webpack'],
},
reporters: ['mocha'],
plugins: [
'karma-mocha-reporter',
'karma-chrome-launcher',
'karma-phantomjs-launcher',
'karma-webpack',
'karma-chai',
'karma-mocha',
],
});
};