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 dcf04dc

Browse filesBrowse files
antsmartianBethGriggs
authored andcommitted
test: refactor test-http2-compat-serverresponse-finished.js
Backport-PR-URL: #22850 PR-URL: #21929 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent d602c7a commit dcf04dc
Copy full SHA for dcf04dc

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

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

Copy file name to clipboardExpand all lines: test/parallel/test-http2-compat-serverresponse-finished.js
+5-5Lines changed: 5 additions & 5 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.