forked from ringcentral/ringcentral-web-phone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
70 lines (55 loc) · 1.82 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
process.env.NODE_ENV = 'karma';
const path = require('path');
const webpackConfig = require('./webpack.config');
module.exports = config => {
require('dotenv').config({silent: true});
config.set({
frameworks: ['jasmine'],
reporters: ['coverage-istanbul', 'mocha'],
preprocessors: {
'src/**/*.ts': ['webpack']
},
webpack: webpackConfig,
webpackMiddleware: {
stats: 'errors-only'
},
coverageIstanbulReporter: {
reports: ['lcov', 'text-summary'],
dir: path.join(__dirname, '.coverage'),
fixWebpackSourcePaths: true
// 'report-config': {
// html: {outdir: 'html'}
// }
},
mime: {
'text/x-typescript': ['ts', 'tsx']
},
files: [
{pattern: './audio/**/*.ogg', included: false},
'./src/*.spec.ts' //TODO Consider using https://github.com/webpack-contrib/karma-webpack#alternative-usage
],
// logLevel: config.LOG_INFO,
browsers: [
//TODO Firefox
'ChromeNoSecurity'
],
browserNoActivityTimeout: 60000,
customLaunchers: {
ChromeNoSecurity: {
flags: [
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--allow-http-screen-capture',
'--disable-web-security'
].concat(process.env.CI || process.env.TRAVIS ? ['--no-sandbox'] : []),
chromeDataDir: path.resolve(__dirname, '.chrome'),
base: 'Chrome'
}
},
client: {
// captureConsole: true,
// showDebugMessages: true,
env: process.env
}
});
};