-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkarma.conf.js
53 lines (51 loc) · 1.62 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
const { startRendezvousServer } = require('chlu-collector/src/rendezvous');
const constants = require('./src/constants');
const webpack = require('webpack');
module.exports = function (config) {
startRendezvousServer(constants.rendezvousPorts.test);
config.set({
browsers: [ 'Firefox' ],
files: [
{ pattern: 'tests/**/*.test.js', watched: true }
],
client: {
mocha: {
opts: 'tests/mocha.opts'
}
},
frameworks: [ 'mocha', 'chai' ],
plugins: [
'karma-firefox-launcher',
'karma-chai',
'karma-mocha',
'karma-sourcemap-loader',
'karma-webpack',
'karma-mocha-reporter'
],
// run the bundle through the webpack and sourcemap plugins
preprocessors: {
'tests/**/*.test.js': [ 'webpack', 'sourcemap' ]
},
reporters: [ 'mocha' ],
// webpack config object
webpack: {
//devtool: 'cheap-module-eval-source-map',
node: {
// Required by js-ipfs
fs: 'empty',
net: 'empty',
tls: 'empty'
},
plugins: [
// do not load Chlu Collector Rendezvous Server: only needed in node-js
new webpack.IgnorePlugin(/^chlu-collector\/src\/rendezvous/),
// ignore SQL index
new webpack.IgnorePlugin(/\/indexes\/sql/)
]
},
webpackMiddleware: {
noInfo: true,
},
browserNoActivityTimeout: 120000
});
};