GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: refactor test-http2-compat-serverresponse-finished.js · nodejs/node@52020dc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-http2-compat-serverresponse-finished.js
Expand file treeCollapse file tree
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)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.