Skip to content

Commit

Permalink
test:replace anonymous closure function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jayasankar-m authored and rvagg committed Nov 28, 2018
1 parent 6dd2925 commit f112c06
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/parallel/test-http-pipeline-socket-parser-typeerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let more;
let done;

const server = http
.createServer(function(req, res) {
.createServer((req, res) => {
if (!once) server.close();
once = true;

Expand All @@ -41,18 +41,18 @@ const server = http
}
done();
})
.on('upgrade', function(req, socket) {
second.end(chunk, function() {
.on('upgrade', (req, socket) => {
second.end(chunk, () => {
socket.end();
});
first.end('hello');
})
.listen(0, function() {
const s = net.connect(this.address().port);
more = function() {
.listen(0, () => {
const s = net.connect(server.address().port);
more = () => {
s.write('GET / HTTP/1.1\r\n\r\n');
};
done = function() {
done = () => {
s.write(
'GET / HTTP/1.1\r\n\r\n' +
'GET / HTTP/1.1\r\nConnection: upgrade\r\nUpgrade: ws\r\n\r\naaa'
Expand Down

0 comments on commit f112c06

Please sign in to comment.