-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathkarma-prod.config.js
44 lines (32 loc) · 1.03 KB
/
karma-prod.config.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
const webpackConfig = require('./webpack-test.config.js');
webpackConfig.mode = 'production';
module.exports = function(config) {
config.set({
singleRun: false,
browsers: ['ChromeHeadless'],
/** * maximum number of tries a browser will attempt in the case of a disconnection */ browserDisconnectTolerance: 2,
/** * How long will Karma wait for a message from a browser before disconnecting from it (in ms). */ browserNoActivityTimeout: 50000,
frameworks: ['jasmine'],
files: ['spec.bundle.js'],
reporters: ['progress', 'kjhtml'],
preprocessors: {
'spec.bundle.js': ['webpack'],
},
webpack: webpackConfig,
webpackMiddleware: {
stats: 'errors-only',
},
client: {
jasmine: {
random: false,
},
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-webpack'),
],
});
};