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 53973fd

Browse filesBrowse files
Jayasankar-mcodebytere
authored andcommitted
test:replace anonymous closure function
PR-URL: #24415 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 555ef65 commit 53973fd
Copy full SHA for 53973fd

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-http-pipeline-socket-parser-typeerror.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-pipeline-socket-parser-typeerror.js
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let more;
2020
let done;
2121

2222
const server = http
23-
.createServer(function(req, res) {
23+
.createServer((req, res) => {
2424
if (!once) server.close();
2525
once = true;
2626

@@ -41,18 +41,18 @@ const server = http
4141
}
4242
done();
4343
})
44-
.on('upgrade', function(req, socket) {
45-
second.end(chunk, function() {
44+
.on('upgrade', (req, socket) => {
45+
second.end(chunk, () => {
4646
socket.end();
4747
});
4848
first.end('hello');
4949
})
50-
.listen(0, function() {
51-
const s = net.connect(this.address().port);
52-
more = function() {
50+
.listen(0, () => {
51+
const s = net.connect(server.address().port);
52+
more = () => {
5353
s.write('GET / HTTP/1.1\r\n\r\n');
5454
};
55-
done = function() {
55+
done = () => {
5656
s.write(
5757
'GET / HTTP/1.1\r\n\r\n' +
5858
'GET / HTTP/1.1\r\nConnection: upgrade\r\nUpgrade: ws\r\n\r\naaa'

0 commit comments

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