Skip to content

Commit 10386ed

Browse files
committed
Default timeout to 30 seconds on CI and 10 seconds locally
1 parent 4ccc3d9 commit 10386ed

File tree

6 files changed

+1
-29
lines changed

6 files changed

+1
-29
lines changed

spec/api-app-spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ describe('app module', function () {
163163
describe('app.importCertificate', function () {
164164
if (process.platform !== 'linux') return
165165

166-
this.timeout(5000)
167-
168166
var w = null
169167
var certPath = path.join(__dirname, 'fixtures', 'certificates')
170168
var options = {

spec/api-browser-window-spec.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ describe('browser-window module', function () {
211211
})
212212

213213
it('does not crash in did-fail-provisional-load handler', function (done) {
214-
this.timeout(10000)
215214
w.webContents.once('did-fail-provisional-load', function () {
216215
w.loadURL('http://127.0.0.1:11111')
217216
done()
@@ -284,7 +283,6 @@ describe('browser-window module', function () {
284283
})
285284

286285
it('emits when window is shown', function (done) {
287-
this.timeout(10000)
288286
w.once('show', function () {
289287
assert.equal(w.isVisible(), true)
290288
done()
@@ -310,7 +308,6 @@ describe('browser-window module', function () {
310308
})
311309

312310
it('emits when window is hidden', function (done) {
313-
this.timeout(10000)
314311
w.show()
315312
w.once('hide', function () {
316313
assert.equal(w.isVisible(), false)
@@ -1002,7 +999,6 @@ describe('browser-window module', function () {
1002999
})
10031000

10041001
it('emits when link with target is called', function (done) {
1005-
this.timeout(10000)
10061002
w.webContents.once('new-window', function (e, url, frameName) {
10071003
e.preventDefault()
10081004
assert.equal(url, 'http://host/')
@@ -1019,7 +1015,6 @@ describe('browser-window module', function () {
10191015
}
10201016

10211017
it('emits when window is maximized', function (done) {
1022-
this.timeout(10000)
10231018
w.once('maximize', function () {
10241019
done()
10251020
})
@@ -1034,7 +1029,6 @@ describe('browser-window module', function () {
10341029
}
10351030

10361031
it('emits when window is unmaximized', function (done) {
1037-
this.timeout(10000)
10381032
w.once('unmaximize', function () {
10391033
done()
10401034
})
@@ -1050,7 +1044,6 @@ describe('browser-window module', function () {
10501044
}
10511045

10521046
it('emits when window is minimized', function (done) {
1053-
this.timeout(10000)
10541047
w.once('minimize', function () {
10551048
done()
10561049
})
@@ -1063,8 +1056,6 @@ describe('browser-window module', function () {
10631056
// This test is too slow, only test it on CI.
10641057
if (!isCI) return
10651058

1066-
this.timeout(20000)
1067-
10681059
it('subscribes to frame updates', function (done) {
10691060
let called = false
10701061
w.loadURL('file://' + fixtures + '/api/frame-subscriber.html')
@@ -1513,7 +1504,6 @@ describe('browser-window module', function () {
15131504
describe('dev tool extensions', function () {
15141505
describe('BrowserWindow.addDevToolsExtension', function () {
15151506
let showPanelIntevalId
1516-
this.timeout(10000)
15171507

15181508
beforeEach(function () {
15191509
BrowserWindow.removeDevToolsExtension('foo')
@@ -1595,8 +1585,6 @@ describe('browser-window module', function () {
15951585
})
15961586

15971587
it('works when used with partitions', function (done) {
1598-
this.timeout(10000)
1599-
16001588
if (w != null) {
16011589
w.destroy()
16021590
}
@@ -1747,8 +1735,6 @@ describe('browser-window module', function () {
17471735
})
17481736

17491737
describe('offscreen rendering', function () {
1750-
this.timeout(10000)
1751-
17521738
beforeEach(function () {
17531739
if (w != null) w.destroy()
17541740
w = new BrowserWindow({

spec/api-ipc-spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,6 @@ describe('ipc module', function () {
434434
})
435435

436436
it('does not crash when reply is not sent and browser is destroyed', function (done) {
437-
this.timeout(10000)
438-
439437
w = new BrowserWindow({
440438
show: false
441439
})

spec/api-net-spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const kOneKiloByte = 1024
2626
const kOneMegaByte = kOneKiloByte * kOneKiloByte
2727

2828
describe('net module', function () {
29-
// this.timeout(0)
3029
describe('HTTP basics', function () {
3130
let server
3231
beforeEach(function (done) {

spec/chromium-spec.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ describe('chromium feature', function () {
2828

2929
describe('sending request of http protocol urls', function () {
3030
it('does not crash', function (done) {
31-
this.timeout(5000)
32-
3331
var server = http.createServer(function (req, res) {
3432
res.end()
3533
server.close()
@@ -78,8 +76,6 @@ describe('chromium feature', function () {
7876

7977
xdescribe('navigator.webkitGetUserMedia', function () {
8078
it('calls its callbacks', function (done) {
81-
this.timeout(5000)
82-
8379
navigator.webkitGetUserMedia({
8480
audio: true,
8581
video: false
@@ -279,8 +275,6 @@ describe('chromium feature', function () {
279275
})
280276

281277
describe('window.opener', function () {
282-
this.timeout(10000)
283-
284278
let url = 'file://' + fixtures + '/pages/window-opener.html'
285279
let w = null
286280

@@ -312,8 +306,6 @@ describe('chromium feature', function () {
312306
})
313307

314308
describe('window.opener access from BrowserWindow', function () {
315-
this.timeout(10000)
316-
317309
const scheme = 'other'
318310
let url = `${scheme}://${fixtures}/pages/window-opener-location.html`
319311
let w = null
@@ -363,8 +355,6 @@ describe('chromium feature', function () {
363355
})
364356

365357
describe('window.opener access from <webview>', function () {
366-
this.timeout(10000)
367-
368358
const scheme = 'other'
369359
const srcPath = `${fixtures}/pages/webview-opener-postMessage.html`
370360
const pageURL = `file://${fixtures}/pages/window-opener-location.html`

spec/static/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
var mocha = new Mocha();
5656

5757
mocha.ui('bdd').reporter(isCi ? 'tap' : 'html');
58+
mocha.timeout(isCi ? 30000 : 10000)
5859

5960
var query = Mocha.utils.parseQuery(window.location.search || '');
6061
if (query.grep) mocha.grep(query.grep);

0 commit comments

Comments
 (0)