-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathkarma.conf.js
61 lines (45 loc) · 1.49 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
60
61
var grunt = require('grunt');
var makeConfig = require('./webpack.config.js');
module.exports = function(config) {
var webpackConfig = makeConfig(grunt);
// in karma, entry is read from files prop
webpackConfig.entry = null;
webpackConfig.devtool = 'inline-source-map';
config.set({
frameworks: ['jasmine'],
files: [
'client/tests.js',
'client/**/*.html',
],
plugins: [
'karma-jasmine',
'karma-chrome-launcher',
'karma-ng-html2js-preprocessor',
'karma-sourcemap-loader',
'karma-webpack',
],
preprocessors: {
'client/**/*.html': ['ng-html2js'],
'client/tests.js': ['webpack', 'sourcemap'],
},
webpack: webpackConfig,
ngHtml2JsPreprocessor: {
stripPrefix: __dirname,
moduleName: 'superdesk.templates-cache',
},
// test results reporter to use
reporters: ['dots'],
// web server port
port: 8080,
// cli runner port
runnerPort: 9100,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// Start these browsers, currently available:
browsers: ['ChromeHeadless'],
// Continuous Integration mode
singleRun: false,
// Seams default 10s is not enough for CI sometime, so let's try 30s
browserNoActivityTimeout: 30000,
});
};