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 f7e5ab0

Browse filesBrowse files
mithunsasidharanMylesBorins
authored andcommitted
test: refactored to remove unnecessary variables
PR-URL: #17553 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 7e2fa5a commit f7e5ab0
Copy full SHA for f7e5ab0

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+4
-6
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-net-connect-options-fd.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-net-connect-options-fd.js
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,13 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS);
8383
path: serverPath
8484
});
8585
const getConnectCb = (index) => common.mustCall(function clientOnConnect() {
86-
const client = this;
8786
// Test if it's wrapping an existing fd
8887
assert(handleMap.has(index));
8988
const oldHandle = handleMap.get(index);
9089
assert.strictEqual(oldHandle.fd, this._handle.fd);
91-
client.write(String(oldHandle.fd));
90+
this.write(String(oldHandle.fd));
9291
console.error(`[Pipe]Sending data through fd ${oldHandle.fd}`);
93-
client.on('error', function(err) {
92+
this.on('error', function(err) {
9493
console.error(err);
9594
assert.fail(null, null, `[Pipe Client]${err}`);
9695
});
Collapse file

‎test/parallel/test-net-connect-options-path.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-net-connect-options-path.js
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ const CLIENT_VARIANTS = 12;
2020
}, CLIENT_VARIANTS))
2121
.listen(serverPath, common.mustCall(function() {
2222
const getConnectCb = () => common.mustCall(function() {
23-
const client = this;
24-
client.end();
25-
client.on('close', common.mustCall(function() {
23+
this.end();
24+
this.on('close', common.mustCall(function() {
2625
counter++;
2726
if (counter === CLIENT_VARIANTS) {
2827
server.close();

0 commit comments

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