-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
karma.conf.js
59 lines (57 loc) · 1.71 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
import playwright from 'playwright';
process.env.CHROME_BIN = playwright.chromium.executablePath()
process.env.WEBKIT_HEADLESS_BIN = playwright.webkit.executablePath()
process.env.FIREFOX_BIN = playwright.firefox.executablePath()
/** @type {(config: import("karma").Config) => void} */
export default function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', 'karma-typescript'],
plugins: [
'karma-jasmine',
'karma-typescript',
'karma-jasmine-html-reporter',
'karma-chrome-launcher',
'karma-webkit-launcher',
'karma-firefox-launcher'
],
client: {
captureConsole: true,
clearContext: false // will show the results in browser once all the testcases are loaded
},
// To avoid DISCONNECTED messages
browserDisconnectTimeout: 10000, // default 2000
browserDisconnectTolerance: 2, // default 0
browserNoActivityTimeout: 4 * 60 * 1000, // default 10000
captureTimeout: 4 * 60 * 1000, // default 60000
files: [
"src/**/*.ts",
"tests/**/*.ts",
],
preprocessors: {
"**/*.ts": "karma-typescript"
},
karmaTypescriptConfig: {
exclude: ["node_modules", "dist"],
compilerOptions: {
"target": "es6",
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"baseUrl": ".",
"paths": {
"git-essentials": ["./src/index"],
"git-essentials/*": ["./src/*"]
}
},
bundlerOptions: {
addNodeGlobals: true
}
},
reporters: ['kjhtml'],
browsers: []
})
}