-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
59 lines (59 loc) · 1.37 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
module.exports = function (config) {
config.set({
files: [
"src/**/*.ts",
"test/**/*.ts"
],
frameworks: ['mocha', 'chai', 'karma-typescript'],
plugins: [
require('karma-mocha'),
require('karma-chai'),
require("karma-coverage"),
require("karma-chrome-launcher"),
require("karma-htmlfile-reporter"),
require("karma-spec-reporter"),
require('karma-mocha-reporter'),
require('karma-typescript')
],
preprocessors: {
"**/*.ts": ['karma-typescript', "coverage"]
},
karmaTypescriptConfig: {
bundlerOptions: {
entrypoints: /\.spec\.ts$/
},
compilerOptions: {
lib: ["es2015"]
}
},
reporters: ['spec', 'coverage', 'html', 'mocha'],
coverageReporter: {
dir: 'build/coverage/',
reporters: [
{ type: 'html' },
{ type: 'text' },
{ type: 'text-summary' }
]
},
htmlReporter: {
outputFile: 'tests/units.html',
pageTitle: 'Unit Tests',
subPageTitle: 'A sample project description',
groupSuites: true,
useCompactStyle: true,
useLegacyStyle: true
},
client: {
mocha: {
ui: 'bdd',
timeout: '5000'
}
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};