generated from Kentico/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
karma.conf.js
63 lines (62 loc) · 1.58 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
63
const path = require('path');
module.exports = function(config) {
config.set({
frameworks: ['jasmine', 'karma-typescript'],
plugins: [
require('karma-jasmine'),
require('karma-typescript'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
],
files: [
{ pattern: 'src/**/*.ts' },
{ pattern: 'test-browser/**/*.ts' },
],
preprocessors: {
'src/**/*.ts': ['karma-typescript'],
'test-browser/**/*.ts': ['karma-typescript'],
},
reporters: ['kjhtml', 'progress', 'karma-typescript', 'coverage-istanbul'],
browsers: ['Chrome'],
karmaTypescriptConfig: {
compilerOptions: {
downlevelIteration: true,
module: 'commonjs',
lib: [
'es2017',
'dom',
'dom.iterable',
],
sourceMap: true,
target: 'es2015',
},
exclude: [
'node_modules',
'types'
],
bundlerOptions: {
transforms: [
require('karma-typescript-es6-transform')(),
],
},
},
coverageIstanbulReporter: {
reports: ['html', 'lcovonly', 'text-summary'],
dir: path.join(__dirname, 'coverage'),
combineBrowserReports: true,
fixWebpackSourcePaths: true,
skipFilesWithNoCoverage: true,
},
port: 9669,
colors: true,
autoWatch: true,
singleRun: false,
client: {
clearContext: false,
},
logLevel: config.DEBUG,
browserDisconnectTolerance: 2,
browserNoActivityTimeout: 5000000,
});
};