-
Notifications
You must be signed in to change notification settings - Fork 1
/
karma.conf.js
57 lines (53 loc) · 1.17 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
let isTravis = process.env.TRAVIS
const reporters = ['progress', 'karma-typescript']
const coverageReporter = {
reporters: []
}
if (isTravis) {
reporters.push('coverage', 'coveralls')
coverageReporter.reporters.push({
type: 'lcov',
dir: 'coverage/'
})
}
module.exports = function(config) {
config.set({
frameworks: ['mocha', 'chai', 'sinon', 'karma-typescript', 'jquery-1.8.3'],
singleRun: isTravis,
files: [
{ pattern: 'src/**/*.ts' },
{ pattern: 'test/**/*.ts' },
],
preprocessors: {
'**/*.ts': ['karma-typescript'],
},
reporters,
coverageReporter,
browsers: isTravis ? ['Chrome_travis_ci'] : ['Chrome'],
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
karmaTypescriptConfig: {
bundlerOptions: {
validateSyntax: false,
sourceMap: true,
},
compilerOptions: {
allowJs: true,
moduleResolution: 'node',
lib: [
"es6",
"es2015",
"es2016",
"es2017",
"dom",
"dom.iterable",
"scripthost"
]
}
}
});
};