forked from clay/clay-kiln
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.local.conf.js
33 lines (30 loc) · 889 Bytes
/
karma.local.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
var settings = require('./karma.conf.js').settings,
WatchIgnorePlugin = require('webpack').WatchIgnorePlugin,
_ = require('lodash');
// generating code coverage reports for local tests
settings.coverageReporter.reporters = [
{ type: 'html', dir: 'coverage/' },
{ type: 'text-summary' }
];
module.exports = function (karma) {
let localSettings = _.assign(settings, {
singleRun: false,
autoWatch: true,
autoWatchBatchDelay: 2000,
browsers: ['Chrome']
});
_.set(localSettings, 'webpack.watch', true);
_.set(localSettings, 'webpack.plugins', [
new WatchIgnorePlugin([
/node_modules\//ig,
/coverage\//ig,
/dist\//ig
])
]);
_.set(localSettings, 'webpack.watchOptions', {
aggregateTimeout: 300,
ignored: /(node_modules|coverage|dist|docs|media|styleguide|.git|.github)/,
poll: 1000
});
karma.set(localSettings);
};