Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Replacing anonymous closure function with arrow function #24439

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The open source license grants you the freedom to use Node.js. It does not
guarantee commitments of other people's time. Please be respectful and manage
your expectations.

## Release Types
## Release Types
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prabusubra - please undo this change!

Copy link
Contributor Author

@prabusubra prabusubra Nov 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, you mean, i have to add trailing space for Release Types?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!!!


* **Current**: Under active development. Code for the Current release is in the
branch for its major version number (for example,
Expand Down
8 changes: 4 additions & 4 deletions test/parallel/test-http-localaddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@ if (!common.hasMultiLocalhost())
const http = require('http');
const assert = require('assert');

const server = http.createServer(function(req, res) {
const server = http.createServer((req, res) => {
console.log(`Connect from: ${req.connection.remoteAddress}`);
assert.strictEqual(req.connection.remoteAddress, '127.0.0.2');

req.on('end', function() {
req.on('end', () => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end(`You are from: ${req.connection.remoteAddress}`);
});
req.resume();
});

server.listen(0, '127.0.0.1', function() {
server.listen(0, '127.0.0.1', () => {
const options = { host: 'localhost',
port: this.address().port,
path: '/',
method: 'GET',
localAddress: '127.0.0.2' };

const req = http.request(options, function(res) {
res.on('end', function() {
res.on('end', () => {
server.close();
process.exit();
});
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http-server-stale-close.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ if (process.env.NODE_TEST_FORK_PORT) {
req.write('BAM');
req.end();
} else {
const server = http.createServer(function(req, res) {
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Length': '42' });
req.pipe(res);
req.on('close', function() {
req.on('close', () => {
server.close();
res.end();
});
Expand Down