]>
git.proxmox.com Git - mirror_novnc.git/blob - karma.conf.js
3 module
.exports = function(config
) {
4 /*var customLaunchers = {
13 browserName: 'firefox',
20 browserName: 'firefox',
27 browserName: 'internet explorer',
28 platform: 'Windows 7',
34 browserName: 'internet explorer',
35 platform: 'Windows 8.1',
39 sl_osxmavericks_safari7: {
41 browserName: 'safari',
42 platform: 'OS X 10.9',
46 sl_osxmtnlion_safari6: {
48 browserName: 'safari',
49 platform: 'OS X 10.8',
54 var customLaunchers
= {};
58 if (process
.env
.SAUCE_USERNAME
&& process
.env
.SAUCE_ACCESS_KEY
) {
62 if (useSauce
&& process
.env
.TEST_BROWSER_NAME
&& process
.env
.TEST_BROWSER_NAME
!= 'PhantomJS') {
63 var names
= process
.env
.TEST_BROWSER_NAME
.split(',');
64 var platforms
= process
.env
.TEST_BROWSER_OS
.split(',');
66 if (process
.env
.TEST_BROWSER_VERSION
) {
67 versions
= process
.env
.TEST_BROWSER_VERSION
.split(',');
72 for (var i
= 0; i
< names
.length
; i
++) {
73 for (var j
= 0; j
< platforms
.length
; j
++) {
74 for (var k
= 0; k
< versions
.length
; k
++) {
75 var launcher_name
= 'sl_' + platforms
[j
].replace(/[^a-zA-Z0-9]/g, '') + '_' + names
[i
];
77 launcher_name
+= '_' + versions
[k
];
80 customLaunchers
[launcher_name
] = {
82 browserName
: names
[i
],
83 platform
: platforms
[j
],
87 customLaunchers
[launcher_name
].version
= versions
[k
];
93 browsers
= Object
.keys(customLaunchers
);
96 browsers
= ['PhantomJS'];
101 // base path that will be used to resolve all patterns (eg. files, exclude)
105 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
106 frameworks
: ['mocha', 'sinon', 'chai', 'sinon-chai'],
109 // list of files / patterns to load in the browser (loaded in order)
112 'tests/assertions.js',
113 'core/util.js', // load first to avoid issues, since methods are called immediately
116 'core/input/keysym.js',
117 'core/input/keysymdef.js',
118 'core/input/xtscancodes.js',
119 'core/input/util.js',
120 'core/input/devices.js',
135 // list of files to exclude
137 '../tests/playback.js',
141 customLaunchers
: customLaunchers
,
143 // start these browsers
144 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
147 // preprocess matching files before serving them to the browser
148 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
154 // test results reporter to use
155 // possible values: 'dots', 'progress'
156 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
157 reporters
: ['mocha', 'saucelabs'],
164 // enable / disable colors in the output (reporters and logs)
169 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
170 logLevel
: config
.LOG_INFO
,
173 // enable / disable watching file and executing tests whenever any file changes
176 // Continuous Integration mode
177 // if true, Karma captures browsers, runs the tests and exits
180 // Increase timeout in case connection is slow/we run more browsers than possible
181 // (we currently get 3 for free, and we try to run 7, so it can take a while)
182 captureTimeout
: 240000,
184 // similarly to above
185 browserNoActivityTimeout
: 100000,
189 my_conf
.captureTimeout
= 0; // use SL timeout
190 my_conf
.sauceLabs
= {
191 testName
: 'noVNC Tests (all)',
193 tunnelIdentifier
: process
.env
.TRAVIS_JOB_NUMBER