-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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: scope redeclared vars in test-child-process* #4944
Conversation
A handful of child process tests had variables declared multiple times in the same scope using `var`. This change scopes those declarations.
lts watch label applied. Hey @Trott , can I ask you to please attach the lts-watch label to these kinds of test updates? It would save a ton of time :-) |
@@ -42,7 +42,7 @@ if (process.argv[2] === 'child') { | |||
}); | |||
|
|||
} else { | |||
var server = dgram.createSocket('udp4'); | |||
server = dgram.createSocket('udp4'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you declare the variable outside of the if
block ?
Edit: I mean move the declaration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, done!
LGTM with a comment. |
A handful of child process tests had variables declared multiple times in the same scope using `var`. This change scopes those declarations. PR-URL: nodejs#4944 Reviewed-By: Michaël Zasso <[email protected]>
Landed in 185f849 |
A handful of child process tests had variables declared multiple times in the same scope using `var`. This change scopes those declarations. PR-URL: #4944 Reviewed-By: Michaël Zasso <[email protected]>
A handful of child process tests had variables declared multiple times in the same scope using `var`. This change scopes those declarations. PR-URL: #4944 Reviewed-By: Michaël Zasso <[email protected]>
A handful of child process tests had variables declared multiple times in the same scope using `var`. This change scopes those declarations. PR-URL: #4944 Reviewed-By: Michaël Zasso <[email protected]>
A handful of child process tests had variables declared multiple times in the same scope using `var`. This change scopes those declarations. PR-URL: #4944 Reviewed-By: Michaël Zasso <[email protected]>
A handful of child process tests had variables declared multiple times in the same scope using `var`. This change scopes those declarations. PR-URL: nodejs#4944 Reviewed-By: Michaël Zasso <[email protected]>
A handful of child process tests had variables declared multiple times
in the same scope using
var
. This change scopes those declarations.