Skip to content

Commit dcf04dc

Browse files
antsmartianBethGriggs
authored andcommittedOct 16, 2018
test: refactor test-http2-compat-serverresponse-finished.js
Backport-PR-URL: #22850 PR-URL: #21929 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent d602c7a commit dcf04dc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎test/parallel/test-http2-compat-serverresponse-finished.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ const net = require('net');
99

1010
// Http2ServerResponse.finished
1111
const server = h2.createServer();
12-
server.listen(0, common.mustCall(function() {
12+
server.listen(0, common.mustCall(() => {
1313
const port = server.address().port;
14-
server.once('request', common.mustCall(function(request, response) {
14+
server.once('request', common.mustCall((request, response) => {
1515
assert.ok(response.socket instanceof net.Socket);
1616
assert.ok(response.connection instanceof net.Socket);
1717
assert.strictEqual(response.socket, response.connection);
1818

19-
response.on('finish', common.mustCall(function() {
19+
response.on('finish', common.mustCall(() => {
2020
assert.strictEqual(response.socket, undefined);
2121
assert.strictEqual(response.connection, undefined);
2222
process.nextTick(common.mustCall(() => {
@@ -30,15 +30,15 @@ server.listen(0, common.mustCall(function() {
3030
}));
3131

3232
const url = `http://localhost:${port}`;
33-
const client = h2.connect(url, common.mustCall(function() {
33+
const client = h2.connect(url, common.mustCall(() => {
3434
const headers = {
3535
':path': '/',
3636
':method': 'GET',
3737
':scheme': 'http',
3838
':authority': `localhost:${port}`
3939
};
4040
const request = client.request(headers);
41-
request.on('end', common.mustCall(function() {
41+
request.on('end', common.mustCall(() => {
4242
client.close();
4343
}));
4444
request.end();

0 commit comments

Comments
 (0)
Please sign in to comment.