-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathkarma.conf.js
51 lines (48 loc) · 1.01 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
var webpack = require("webpack");
module.exports = function(config) {
var configuration = {
files: [
'spec/index.ts'
],
frameworks: [ 'mocha', 'chai' ],
preprocessors: {
'spec/*.ts': [ 'webpack' ]
},
reporters: ['spec'],
webpack: {
mode: 'development',
devtool: 'eval-source-map',
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json']
},
module: {
rules: [
{ test: /\.tsx?$/, loader: 'awesome-typescript-loader' }
]
},
externals: {
'request': 'window.request'
},
},
autoWatch: false,
singleRun: true,
browsers: [ 'ChromeHeadless' ],
mime: {
'text/x-typescript': ['ts']
}
};
if (config.tdd) {
configuration = Object.assign(configuration, {
reporters: ['spec'],
autoWatch: true,
singleRun: false,
browsers: [ 'Chrome' ],
client: {
mocha: {
reporter: 'html'
}
}
});
}
config.set(configuration);
};