-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkarma.browser.conf.js
55 lines (51 loc) · 1.64 KB
/
karma.browser.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
process.env.CHROME_BIN = require('puppeteer').executablePath();
const path = require('path');
module.exports = function (config) {
config.set({
browsers: [ "ChromeHeadless" ],
listenAddress: 'localhost',
hostname: 'localhost',
frameworks: [ "mocha", "karma-typescript" ],
files: [
{ pattern: "lib/src/**/*.ts" },
{ pattern: "lib/test/src/browser/**/*.ts" },
{ pattern: "lib/test/src/common/**/*.ts" }
],
preprocessors: {
"lib/src/**/*.ts": [ "karma-typescript" ],
"lib/test/src/**/*.ts": [ "karma-typescript" ]
},
karmaTypescriptConfig: {
tsconfig: "./lib/test/tsconfig.test.karma.json",
compilerOptions: {
sourceMap: true
},
bundlerOptions: {
sourceMap: true
},
coverageOptions: {
instrumentation: true,
sourceMap: true,
exclude: [
/\.(d|spec|test)\.ts$/i,
/index.ts$/i,
/polyfills.ts$/i
]
},
reports: {
"html-spa": {
"directory": "./coverage",
"subdirectory": "browser"
},
"json": {
"directory": "./coverage",
"subdirectory": "browser",
"filename": "coverage-final.json"
},
"text": ""
}
},
reporters: [ "spec", "karma-typescript" ],
logLevel: config.LOG_INFO
})
};