-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathkarma.conf.js
83 lines (80 loc) · 2.6 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
75
76
77
78
79
80
81
82
83
/*
* @copyright (c) 2016-present, Philipp Thuerwaechter & Pattrick Hueper
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
*/
// eslint-disable-next-line func-names
module.exports = function (config) {
const saucelabsLaunchers = {
sl_ie: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 10',
version: 'latest'
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
platform: 'Windows 10',
version: 'latest',
},
// the following launchers are currently unused,
// but provided here for manual/local tests if needed
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 10',
version: 'latest',
},
sl_safari: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.11',
version: 'latest',
},
sl_edge: {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
platform: 'Windows 10',
version: 'latest',
},
};
// eslint-disable-next-line global-require
const webpackConfigs = require('./webpack.config.js');
// find the config for our main dev build
const webpackConfig = webpackConfigs.find(c => c.output.filename === 'js-joda-timezone.js');
// for the karma test runs, we don't want to have any externals,
// especially js-joda should be included!
webpackConfig.externals = undefined;
config.set({
files: [
{ pattern: 'test/karmaWebpackTestEntry.js' },
],
frameworks: [
'mocha',
'chai',
],
preprocessors: {
'test/karmaWebpackTestEntry.js': ['webpack'],
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true,
},
sauceLabs: {
testName: 'js-joda-timezone karma Tests',
recordVideo: false,
recordScreenshots: false,
connectOptions: {
logfile: 'sauce_connect.log',
},
},
customLaunchers: saucelabsLaunchers,
browserDisconnectTimeout: 10000, // default 2000
// browserDisconnectTolerance: 1, // default 0
browserNoActivityTimeout: 4 * 60 * 1000, // default 10000
captureTimeout: 4 * 60 * 1000, // default 60000
reporters: ['progress'],
browsers: ['Chrome', 'Firefox', 'PhantomJS'],
plugins: ['karma-*'],
});
};