forked from superdesk/superdesk-client-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
82 lines (64 loc) · 1.86 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
'use strict';
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 = {};
webpackConfig.devtool = 'inline-source-map';
config.set({
frameworks: [
'jasmine'
],
plugins: [
'karma-jasmine',
'karma-junit-reporter',
'karma-chrome-launcher',
'karma-ng-html2js-preprocessor',
'karma-sourcemap-loader',
'karma-webpack'
],
preprocessors: {
'**/*.html': ['ng-html2js'],
'scripts/tests.js': ['webpack', 'sourcemap']
},
webpack: webpackConfig,
webpackMiddleware: {
chunks: false,
modules: false,
stats: false,
debug: false,
progress: false
//quiet: true
},
files: [
'scripts/tests.js',
'scripts/**/*.html'
],
ngHtml2JsPreprocessor: {
stripPrefix: __dirname,
moduleName: 'superdesk.templates-cache'
},
junitReporter: {
outputFile: 'test-results.xml'
},
// 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: ['ChromeNoSandbox'],
customLaunchers: {
ChromeNoSandbox: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
// Continuous Integration mode
singleRun: false
});
};