This repository has been archived by the owner on Jan 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathkarma.conf.js
58 lines (56 loc) · 1.59 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
module.exports = function (config) {
var customLaunchers = {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
};
var configuration = {
plugins: [
'karma-mocha', 'karma-coverage', 'karma-html2js-preprocessor', 'karma-chrome-launcher', 'karma-chai'
],
basePath: '',
frameworks: ['mocha', 'chai'],
client: {
contextFile: '/test/index.html'
},
files: [
'https://static.opentok.com/v2/js/opentok.min.js',
'https://code.jquery.com/jquery-1.10.2.js',
'https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js',
'node_modules/opentok-solutions-logging/src/opentok-solutions-logging.js',
'dist/opentok-screen-sharing.js',
'test/components/accelerator-pack.js',
'test/opentok-screen-sharing-test.js'
],
exclude: [
],
preprocessors: {
'test/*.html': ['html2js'],
'src/*.js': ['coverage']
},
reporters: ['progress', 'coverage', 'dots'],
port: 9877,
colors: true,
autoWatch: true,
browsers: [],
singleRun: true,
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' }
]
},
};
if (process.env.TRAVIS) {
configuration.customLaunchers = customLaunchers;
configuration.browsers = Object.keys(customLaunchers);
}
config.set(configuration);
};