]>
git.proxmox.com Git - mirror_novnc.git/blob - karma.conf.js
3 module
.exports
= (config
) => {
4 const customLaunchers
= {};
8 // use Sauce when running on Travis
9 if (process
.env
.TRAVIS_JOB_NUMBER
) {
13 if (useSauce
&& process
.env
.TEST_BROWSER_NAME
&& process
.env
.TEST_BROWSER_NAME
!= 'PhantomJS') {
14 const names
= process
.env
.TEST_BROWSER_NAME
.split(',');
15 const platforms
= process
.env
.TEST_BROWSER_OS
.split(',');
16 const versions
= process
.env
.TEST_BROWSER_VERSION
17 ? process
.env
.TEST_BROWSER_VERSION
.split(',')
20 for (let i
= 0; i
< names
.length
; i
++) {
21 for (let j
= 0; j
< platforms
.length
; j
++) {
22 for (let k
= 0; k
< versions
.length
; k
++) {
23 let launcher_name
= 'sl_' + platforms
[j
].replace(/[^a-zA-Z0-9]/g, '') + '_' + names
[i
];
25 launcher_name
+= '_' + versions
[k
];
28 customLaunchers
[launcher_name
] = {
30 browserName
: names
[i
],
31 platform
: platforms
[j
],
35 customLaunchers
[launcher_name
].version
= versions
[k
];
41 browsers
= Object
.keys(customLaunchers
);
44 //browsers = ['PhantomJS'];
50 // base path that will be used to resolve all patterns (eg. files, exclude)
54 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
55 frameworks
: ['mocha', 'sinon-chai'],
57 // list of files / patterns to load in the browser (loaded in order)
59 { pattern
: 'app/localization.js', included
: false },
60 { pattern
: 'app/webutil.js', included
: false },
61 { pattern
: 'core/**/*.js', included
: false },
62 { pattern
: 'vendor/pako/**/*.js', included
: false },
63 { pattern
: 'vendor/browser-es-module-loader/dist/*.js*', included
: false },
64 { pattern
: 'tests/test.*.js', included
: false },
65 { pattern
: 'tests/fake.*.js', included
: false },
66 { pattern
: 'tests/assertions.js', included
: false },
68 'tests/karma-test-main.js',
73 // replace Karma debug page with mocha display
79 // list of files to exclude
83 customLaunchers
: customLaunchers
,
85 // start these browsers
86 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
89 // test results reporter to use
90 // possible values: 'dots', 'progress'
91 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
99 // enable / disable colors in the output (reporters and logs)
104 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
105 logLevel
: config
.LOG_INFO
,
108 // enable / disable watching file and executing tests whenever any file changes
111 // Continuous Integration mode
112 // if true, Karma captures browsers, runs the tests and exits
115 // Increase timeout in case connection is slow/we run more browsers than possible
116 // (we currently get 3 for free, and we try to run 7, so it can take a while)
117 captureTimeout
: 240000,
119 // similarly to above
120 browserNoActivityTimeout
: 100000,
124 my_conf
.reporters
.push('saucelabs');
125 my_conf
.captureTimeout
= 0; // use SL timeout
126 my_conf
.sauceLabs
= {
127 testName
: 'noVNC Tests (all)',
129 tunnelIdentifier
: process
.env
.TRAVIS_JOB_NUMBER