-
Notifications
You must be signed in to change notification settings - Fork 129
/
karma.conf.cjs
81 lines (63 loc) · 1.82 KB
/
karma.conf.cjs
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
module.exports = function(config) {
config.set({
frameworks: ['mocha', 'chai', 'sinon'],
files: [
{ pattern: "src/test/js/**/*.js", type: "module" },
{ pattern: "src/main/js/**/*.js", included: false, served:true }
],
proxies: {
'/volume-meter-processor.js': '/base/src/main/js/volume-meter-processor.js'
},
reporters: ['progress', 'coverage'],
preprocessors: {
'src/main/js/*.js': ['coverage'],
},
coverageReporter: {
reporters: [
{type: 'lcov', dir:'coverage/lcov'},
{type: 'text'},
{type: 'html', dir:'coverage/html'}
],
},
port: 9876, // karma web server port
colors: true,
//logLevel: config.LOG_DEBUG
logLevel: config.LOG_INFO,
browsers: ['CustomChrome', "ChromeMobileUserAgent"],
//browsers: ['Chrome'],
customLaunchers: {
CustomChrome: {
base: 'Chrome',
flags: ['--headless',
'--disable-gpu',
"--headless=new",
"--no-sandbox",
"--disable-dev-shm-usage",
"--log-level=1",
"--remote-allow-origins=*",
"--use-fake-ui-for-media-stream",
"--use-fake-device-for-media-stream",
]
},
ChromeMobileUserAgent: {
base: 'Chrome',
flags: [
'--headless',
'--disable-gpu',
"--headless=new",
"--no-sandbox",
"--disable-dev-shm-usage",
"--log-level=1",
"--remote-allow-origins=*",
"--use-fake-ui-for-media-stream",
"--use-fake-device-for-media-stream",
'--user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1"'
]
},
},
autoWatch: true,
singleRun: true, // Karma captures browsers, runs the tests and exits
//singleRun: false,
concurrency: Infinity,
})
}