-
Notifications
You must be signed in to change notification settings - Fork 104
/
karma.conf.js
70 lines (68 loc) · 1.5 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
64
65
66
67
68
69
70
module.exports = function (config) {
config.set({
basePath: '.',
files: [
'test/vendor.ts',
'test/*.spec.ts'
],
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-remap-istanbul'),
require('karma-webpack'),
require('karma-sourcemap-loader'),
require('karma-coverage')
],
preprocessors: {
'test/vendor.ts': ['webpack', 'sourcemap'],
'test/*.spec.ts': ['webpack', 'sourcemap']
},
webpack: {
devtool: 'source-map',
module: {
loaders: [
{
test: /\.ts/,
loaders: ['ts-loader'],
exclude: /node_modules/
}
]
},
resolve: {
extensions: ["", ".js", ".ts"]
}
},
webpackServer: {
noInfo: true
},
autoWatch: true,
browsers: ['Chrome'],
customLaunchers: {
chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
},
phantom_travis_ci: {
base: 'PhantomJS',
flags: ['--no-sandbox']
}
},
reporters: ['progress', 'coverage', 'karma-remap-istanbul'],
coverageReporter: {
type: 'html',
dir: 'coverage/'
},
colors: true,
exclude: [],
mime: {
'text/x-typescript': ['ts', 'tsx']
},
port: 9876
});
if (process.env.TRAVIS) {
config.browser = ['chrome_travis_ci'];
config.singleRun = true;
config.browserNoActivityTimeout = 90000;
}
};