Skip to content

Commit bdf72de

Browse files
committed
Remove no-longer needed closures
1 parent 8ceae6c commit bdf72de

File tree

2 files changed

+256
-264
lines changed

2 files changed

+256
-264
lines changed
Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
'use strict';
22

3-
(function() {
4-
/* eslint-disable global-require*/
5-
const seleniumAssistant = require('selenium-assistant');
6-
/* eslint-enable global-require*/
3+
const seleniumAssistant = require('selenium-assistant');
74

8-
let forceDownload = false;
9-
if (process.env.TRAVIS) {
10-
forceDownload = true;
11-
}
5+
let forceDownload = false;
6+
if (process.env.TRAVIS) {
7+
forceDownload = true;
8+
}
129

13-
const promises = [
14-
seleniumAssistant.downloadBrowser('firefox', 'stable', forceDownload),
15-
seleniumAssistant.downloadBrowser('firefox', 'beta', forceDownload),
16-
seleniumAssistant.downloadBrowser('firefox', 'unstable', forceDownload),
17-
seleniumAssistant.downloadBrowser('chrome', 'stable', forceDownload),
18-
seleniumAssistant.downloadBrowser('chrome', 'beta', forceDownload),
19-
seleniumAssistant.downloadBrowser('chrome', 'unstable', forceDownload)
20-
];
10+
const promises = [
11+
seleniumAssistant.downloadBrowser('firefox', 'stable', forceDownload),
12+
seleniumAssistant.downloadBrowser('firefox', 'beta', forceDownload),
13+
seleniumAssistant.downloadBrowser('firefox', 'unstable', forceDownload),
14+
seleniumAssistant.downloadBrowser('chrome', 'stable', forceDownload),
15+
seleniumAssistant.downloadBrowser('chrome', 'beta', forceDownload),
16+
seleniumAssistant.downloadBrowser('chrome', 'unstable', forceDownload)
17+
];
2118

22-
return Promise.all(promises)
23-
.then(function() {
24-
console.log('Download complete.');
25-
})
26-
.catch(function(err) {
27-
console.error('Unable to download browsers.', err);
28-
process.exit(1);
29-
});
30-
})();
19+
Promise.all(promises)
20+
.then(function() {
21+
console.log('Download complete.');
22+
})
23+
.catch(function(err) {
24+
console.error('Unable to download browsers.', err);
25+
process.exit(1);
26+
});

0 commit comments

Comments
 (0)