-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
50 lines (49 loc) · 1.46 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
process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = (config) => {
config.set({
singleRun: true,
frameworks: ['jasmine'],
proxies: {
// smooths over loading files because karma prepends '/base/' to everything
'/src/' : '/base/src/',
'/test-images/': '/base/test-images/'
},
files: [
'specs/index.ts',
{ pattern: 'test-images/*.png', included: false, served: true }
],
mime: { 'text/x-typescript': ['ts','tsx'] },
preprocessors: {
"specs/index.ts": ["webpack", 'sourcemap']
},
webpack: {
devtool: 'source-map',
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{ test: /\.ts$/, loader: 'ts-loader'}
]
}
},
reporters: ['progress'],
browsers: ['ChromeHeadless_with_debug'],
customLaunchers: {
ChromeHeadless_with_debug: {
base: 'ChromeHeadless',
flags: [
'--remote-debugging-port=9334',
'--no-sandbox'
]
},
Chrome_with_debug: {
base: 'Chrome',
flags: [
'--remote-debugging-port=9334',
'--no-sandbox'
]
}
}
});
}