-
Notifications
You must be signed in to change notification settings - Fork 38
/
karma.conf.js
74 lines (71 loc) · 2.21 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
71
72
73
74
module.exports = function(config) {
var configuration = {
plugins: [
'karma-mocha', 'karma-coverage', 'karma-html2js-preprocessor', 'karma-chrome-launcher', 'karma-chai', 'karma-browserify'
],
basePath: '',
frameworks: ['mocha', 'browserify', 'chai'],
client: {
contextFile: '/test/index.html'
},
files: [
'https://static.opentok.com/v2/js/opentok.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js',
'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js',
'test/communication-test.js',
'test/core-test.js',
'test/state-test.js'
],
exclude: [
],
preprocessors: {
'test/*.html': ['html2js'],
'src/*.js': ['coverage'],
'test/*.js': ['browserify'],
'src/*.js': ['browserify']
},
reporters: ['progress', 'coverage'],
port: 9877,
colors: true,
autoWatch: true,
browsers: ['Chrome'],
browserDisconnectTimeout: 10000,
browserDisconnectTolerance: 3,
browserNoActivityTimeout: 60000,
flags: [
'--disable-web-security',
'--disable-gpu',
'--no-sandbox'
],
singleRun: true,
browserify: {
debug: true,
transform: [
['babelify', {plugins: ['babel-plugin-espower']}]
]
},
logLevel: config.LOG_INFO,
coverageReporter: {
dir: 'test/coverage',
instrumenter: {
'src/*.js': ['istanbul']
},
reporters: [
{ type: 'html', subdir: 'report-html' },
{ type: 'lcov', subdir: 'report-lcov' },
{ type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' }
]
},
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox', '--disable-web-security',
'--disable-gpu']
}
}
};
if (process.env.TRAVIS) {
configuration.browsers = ['Chrome_travis_ci'];
}
config.set(configuration);
};