-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathkarma.conf.js
More file actions
61 lines (60 loc) · 1.56 KB
/
karma.conf.js
File metadata and controls
61 lines (60 loc) · 1.56 KB
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
// "resolveJsonModule": true is required to load json files in tests, e.g. meta schemas (see schemas.spec.ts)
const tsconfig = {
"compilerOptions": {
"lib": [
"es2015",
"dom"
],
"resolveJsonModule": true
},
"reports": {
"html": "coverage",
"lcovonly": "coverage"
}
};
module.exports = function (config) {
config.set({
basePath: '',
files: [
'src/**/*.ts'
],
preprocessors: {
'**/*.ts': 'karma-typescript'
},
frameworks: ['jasmine', 'karma-typescript'],
karmaTypescriptConfig: tsconfig,
plugins: [
require('karma-typescript'),
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-bamboo-reporter'),
require('karma-mocha-reporter')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
random: false,
port: 9876,
colors: true,
reporters: ['progress', 'mocha', 'bamboo', 'karma-typescript'],
bambooReporter: {
filename: 'mocha.json'
},
browsers: ['MyChromeHeadless'], // use Chrome to see UI, available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
customLaunchers: {
MyChromeHeadless: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
coverageReporter: {
type : 'html',
dir : 'coverage/'
},
singleRun: false,
autoWatch: true,
concurrency: Infinity, // how many browser should be started simultanous
browserNoActivityTimeout: 100000,
browserDisconnectTolerance: 2
});
};