forked from httptoolkit/mockttp
/
karma.conf.js
52 lines (49 loc) · 1.49 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
const tmp = require('tmp');
tmp.setGracefulCleanup();
module.exports = function(config) {
config.set({
frameworks: ['mocha', 'chai'],
files: [
'test/**/*.spec.ts'
],
mime: { 'text/x-typescript': ['ts'] },
webpack: {
devtool: 'source-map',
resolve: { extensions: ['.ts', '.js'] },
module: {
loaders: [
{ test: /\.ts$/, loader: 'ts-loader', exclude: /node_modules/ }
]
},
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
},
output: {
path: tmp.dirSync()
}
},
webpackMiddleware: {
stats: 'error-only'
},
preprocessors: {
'src/**/*.ts': ['webpack', 'sourcemap'],
'test/**/*.ts': ['webpack', 'sourcemap']
},
reporters: ['progress'],
port: 9876,
logLevel: config.LOG_INFO,
browsers: ['ChromeWithCert'],
customLaunchers: {
ChromeWithCert: {
base: 'Chrome', // TODO: Find a way to ignore certs with ChromeHeadless in here
// This is the fingerprint for the test-ca.pem CA cert
flags: ['--ignore-certificate-errors-spki-list=dV1LxiEDeQEtLjeMCGZ4ON7Mu1TvULkgt/kg1DGk/vM=']
}
},
autoWatch: false,
singleRun: true,
concurrency: Infinity
});
};