Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 627e484

Browse filesBrowse files
PoojaDurgadaddaleax
authored andcommitted
test: use mustCall() in test-http-timeout
PR-URL: #34996 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent cd4b2aa commit 627e484
Copy full SHA for 627e484

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-http-timeout.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-timeout.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
require('../common');
23+
const common = require('../common');
2424

2525
const http = require('http');
2626
const Countdown = require('../common/countdown');
27+
const MAX_COUNT = 11;
2728

28-
const server = http.createServer(function(req, res) {
29+
const server = http.createServer(common.mustCall(function(req, res) {
2930
res.writeHead(200, { 'Content-Type': 'text/plain' });
3031
res.end('OK');
31-
});
32+
}, MAX_COUNT));
3233

33-
const MAX_COUNT = 11;
3434
const agent = new http.Agent({ maxSockets: 1 });
3535
const countdown = new Countdown(MAX_COUNT, () => server.close());
3636

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.