forked from mattapperson/react-joi-forms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkarma.conf.js
executable file
·59 lines (53 loc) · 1.63 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
var webpack = require('webpack');
var path = require('path');
module.exports = function(config) {
config.set({
basePath: '',
preprocessors: {
'./tests/**/*.spec.js': ['webpack', 'sourcemap']
},
files: [
'./tests/**/*.spec.js'
],
frameworks: ['mocha', 'chai'],
reporters: [
'progress'
],
plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-chai',
'karma-mocha',
'karma-sourcemap-loader',
'karma-webpack',
],
webpack: {
devtool: 'inline-source-map',
module: {
loaders: [
{ test: /\.(jsx|js)$/, exclude: /node_modules/, loader: 'babel-loader?optional=runtime&stage=1' }
]
},
plugins: [
new webpack.NormalModuleReplacementPlugin(/^(net|dns)$/, path.resolve(__dirname, './tests/setup/shim.js')),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('test')
})
],
resolve: {
extensions: ['', '.js', '.jsx'], //ts, or anything else
root: [path.join(__dirname, "./node_modules"), path.join(__dirname, "./src")]
}
},
webpackServer: {
noInfo: true
},
browserNoActivityTimeout: 30000,
browsers: [ 'Firefox', 'Chrome' ],
singleRun: true,
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
});
};