-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.js
42 lines (38 loc) · 1.12 KB
/
karma.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
module.exports = function(config) {
config.set({
// ... normal karma configuration
files: [
// all files ending in "_test"
'karma.entry.js'
// each file acts as entry point for the webpack configuration
],
frameworks: ['mocha', 'chai'],
singleRun: true,
preprocessors: {
'karma.entry.js': ['webpack', 'sourcemap']
},
webpack: {
devtool: 'inline-source-map', //just do inline source maps instead of the default
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ }
]
}
},
webpackMiddleware: {
// webpack-dev-middleware configuration
// i. e.
noInfo: true
},
reporters: ['mocha'],
plugins: [
require("karma-webpack"),
'karma-mocha',
'karma-chai',
'karma-phantomjs-launcher',
'karma-sourcemap-loader',
'karma-mocha-reporter'
],
browsers: ['PhantomJS']
});
};