This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
62 lines (58 loc) · 1.53 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
function browserNormaliser(browser) {
return browser.toLowerCase().split(/[ /-]/)[0];
}
module.exports = function(config) {
var chromeOpts = {
base: "Chrome"
}
if (process.env.CI) {
chromeOpts = {
base: "ChromeHeadless",
flags: ["--no-sandbox"]
};
}
var preprocessors = {};
var reporters = ['progress', 'kjhtml'];
if (!process.env.SKIP_COVERAGE) {
preprocessors["src/*.js"] = ["coverage"];
reporters.push("coverage");
}
config.set({
logLevel: config.LOG_INFO,
frameworks: ['jasmine'],
customLaunchers: {
ChromeMaybeHeadless: chromeOpts
},
files: [
{pattern: "spec/**/*spec.js", type: "module"},
{pattern: "src/*.js", type: "module"}
],
reporters: reporters,
preprocessors: preprocessors,
client: {
clearContext: false,
jasmine: {
failSpecWithNoExpectations: true
}
},
coverageReporter: {
reporters: [
{
type: 'lcov',
dir: 'coverage/',
subdir: '.'
},
{type: "text-summary"},
{
type: "html",
dir: "htmlcov",
subdir: browserNormaliser
}
]
},
jasmineHtmlReporter: {
suppressAll: true,
suppressFailed: true
}
})
}