-
Notifications
You must be signed in to change notification settings - Fork 462
/
karma.conf.js
55 lines (54 loc) · 1.42 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
var argv = require('yargs').argv;
var browserName = 'Chrome_headless';
if (argv.chrome) {
browserName = 'Chrome_headless'
}
else if (argv.firefox) {
browserName = 'Firefox'
}
const flags = [
'--disable-extensions',
'--no-proxy-server',
'--js-flags="--max_old_space_size=6500"',
'--high-dpi-support=1',
];
module.exports = function (config) {
config.set({
frameworks: ['jasmine'],
files: [
'./node_modules/jquery/dist/jquery.js',
'./node_modules/es6-promise/dist/es6-promise.js',
'./tmp/**/*.js',
{ pattern: './test/**/*.html', served: true, included: false }
],
exclude: [],
reporters: argv.chrome ? ['kjhtml'] : ['spec', 'junit'],
autoWatch: true,
browsers: [browserName],
browserNoActivityTimeout: 300000,
plugins: [
'karma-firefox-launcher',
'karma-chrome-launcher',
'karma-jasmine',
'karma-spec-reporter',
'karma-jasmine-html-reporter',
'karma-junit-reporter'
],
customLaunchers: {
'Chrome_headless': {
base: 'Chrome',
flags: flags.concat("--no-sandbox", "--window-size=800,800"),
},
},
junitReporter: {
outputDir: 'tmp',
outputFile: 'testresults.xml',
useBrowserName: false
},
retryLimit: 0,
logLevel: argv.debug ? config.LOG_DEBUG : config.LOG_INFO,
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
}
});
};