Skip to content

Commit

Permalink
test: refactor test-https-set-timeout-server
Browse files Browse the repository at this point in the history
* Add common.mustCall() for error handlers.
* Alphabetize modules

PR-URL: nodejs#13032
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
  • Loading branch information
Trott committed May 20, 2017
1 parent 6bfdeed commit 658741b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/sequential/test-https-set-timeout-server.js
Expand Up @@ -21,16 +21,16 @@

'use strict';
const common = require('../common');
const assert = require('assert');

if (!common.hasCrypto) {
common.skip('missing crypto');
return;
}
const https = require('https');

const tls = require('tls');
const assert = require('assert');
const fs = require('fs');
const https = require('https');
const tls = require('tls');

const tests = [];

Expand Down Expand Up @@ -69,7 +69,7 @@ test(function serverTimeout(cb) {
https.get({
port: this.address().port,
rejectUnauthorized: false
}).on('error', common.noop);
}).on('error', common.mustCall());
}));
});

Expand All @@ -90,7 +90,7 @@ test(function serverRequestTimeout(cb) {
method: 'POST',
rejectUnauthorized: false
});
req.on('error', common.noop);
req.on('error', common.mustCall());
req.write('Hello');
// req is in progress
});
Expand All @@ -111,7 +111,7 @@ test(function serverResponseTimeout(cb) {
https.get({
port: this.address().port,
rejectUnauthorized: false
}).on('error', common.noop);
}).on('error', common.mustCall());
});
});

Expand All @@ -131,7 +131,7 @@ test(function serverRequestNotTimeoutAfterEnd(cb) {
https.get({
port: this.address().port,
rejectUnauthorized: false
}).on('error', common.noop);
}).on('error', common.mustCall());
});
});

Expand Down

0 comments on commit 658741b

Please sign in to comment.