-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.ts
90 lines (80 loc) · 2.46 KB
/
karma.conf.ts
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import { Config, ConfigOptions } from 'karma';
import { ITslintPreprocessorConfig } from 'karma-tslint/lib/tslint.preprocessor';
import { KarmaTypescriptConfig } from 'karma-typescript/src/api/configuration';
export = (config: Config) => {
config.set({
basePath: '.',
frameworks: ['jasmine', 'karma-typescript'],
files: [
'./node_modules/es6-promise/dist/es6-promise.auto.min.js',
'./modules/**/*.ts',
'./test/**/*.ts'
],
preprocessors: {
'./+(modules|test)/**/*.ts': ['tslint', 'karma-typescript']
},
karmaTypescriptConfig: {
tsconfig: './tsconfig.json',
reports: {
'text-summary': null,
html: {
'directory': './coverage/html'
},
json: {
'directory': './coverage',
'subdirectory': '.',
'filename': 'coverage.json',
}
},
coverageOptions: {
threshold: {
global: {
statements: 85,
branches: 85,
functions: 85,
lines: 85
}
}
}
} as KarmaTypescriptConfig,
tslintPreprocessor: {
stopOnFailure: true
} as ITslintPreprocessorConfig,
reporters: [
'progress', 'karma-typescript'
],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['PhantomJS'],
customLaunchers: {
IE8: {
base: 'IE',
browserName: 'IE8',
'x-ua-compatible': 'IE=EmulateIE9'
},
IE9: {
base: 'IE',
browserName: 'IE9',
'x-ua-compatible': 'IE=EmulateIE9'
},
IE10: {
base: 'IE',
browserName: 'IE10',
'x-ua-compatible': 'IE=EmulateIE10'
}
},
singleRun: true,
plugins: [
'karma-chrome-launcher',
'karma-edge-launcher',
'karma-firefox-launcher',
'karma-ie-launcher',
'karma-jasmine',
'karma-phantomjs-launcher',
'karma-tslint',
'karma-typescript'
]
} as ConfigOptions);
};