forked from ringcentral/ringcentral-web-phone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
70 lines (56 loc) · 1.85 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) {
require('dotenv').config({silent: true});
var path = require('path');
config.set({
frameworks: [
'mocha',
'chai',
'sinon-chai'
],
files: [
'http://cdn.rawgit.com/onsip/SIP.js/0.7.7/dist/sip-0.7.7.js', //FIXME We use CDN because SIP.JS NPM does not have build version
require.resolve('es6-promise/dist/es6-promise.auto'),
require.resolve('pubnub/dist/web/pubnub'),
require.resolve('whatwg-fetch'),
require.resolve('ringcentral/build/ringcentral'),
{pattern: './audio/**/*.ogg', included: false},
'./src/ringcentral-web-phone.js',
'./src/**/*.spec.js'
],
reporters: ['mocha'],
logLevel: config.LOG_INFO,
browsers: [
//TODO Firefox
'ChromeNoSecurity'
],
customLaunchers: {
ChromeNoSecurity: {
flags: [
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--allow-http-screen-capture',
'--disable-web-security',
'--no-sandbox'
].concat(process.env.CI || process.env.TRAVIS ? ['--no-sandbox'] : []),
chromeDataDir: path.resolve(__dirname, '.chrome'),
base: 'Chrome'
}
},
plugins: [
'karma-chrome-launcher',
'karma-mocha',
'karma-mocha-reporter',
'karma-chai-plugins'
],
singleRun: true,
client: {
captureConsole: true,
showDebugMessages: true,
mocha: {
ui: "bdd",
timeout: 5000
},
env: process.env
}
});
};