-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: removed unnecessary Buffer import #13860
Conversation
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.
Looks good, just a few nits
test/disabled/test-sendfd.js
Outdated
@@ -8,7 +8,7 @@ | |||
// persons to whom the Software is furnished to do so, subject to the | |||
// following conditions: | |||
// | |||
// The above copyright notice and this permission notice shall be included | |||
// The above copnotice and this permission notice shall be included |
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.
Unintentional?
(beware of over eager IDEs. If you're using WebStorm, enable ESlint with our .eslint.yaml
)
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.
yes completely, do you want me to close and fix all of this?
test/disabled/test-sendfd.js
Outdated
}; | ||
|
||
var SOCK_PATH = path.join(__dirname, | ||
'..', | ||
path.basename(__filename, '.js') + '.sock'); | ||
'..', |
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.
So we either chop (put every arg in it's own line)
Or align to call (
(as it was).
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.
fixed :-)
test/disabled/test-sendfd.js
Outdated
@@ -8,7 +8,7 @@ | |||
// persons to whom the Software is furnished to do so, subject to the | |||
// following conditions: | |||
// | |||
// The above copyright notice and this permission notice shall be included | |||
// The above copnotice and this permission notice shall be included |
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.
Can you please revert this change?
test/disabled/test-sendfd.js
Outdated
const child_process = require('child_process'); | ||
const fs = require('fs'); | ||
const net = require('net'); | ||
var netBinding = process.binding('net'); | ||
const path = require('path'); | ||
|
||
var DATA = { | ||
'ppid' : process.pid, | ||
'ord' : 0 | ||
'ppid': process.pid, |
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.
This change is unrelated. You may do it in this PR if you want, but you need to reframe the commit message and the PR title differently then.
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.
Suggestion: Something like:
test: removed unnecessary require and style fix
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.
Reverted the change so won't change title
Thanks for pointing it out
Lesson learned not to have auto-beautify when working on open-source projects :-)
test/disabled/test-sendfd.js
Outdated
}; | ||
|
||
var SOCK_PATH = path.join(__dirname, | ||
'..', | ||
path.basename(__filename, '.js') + '.sock'); | ||
'..', |
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.
Unrelated style change.
test/disabled/test-sendfd.js
Outdated
var cp = child_process.spawn(process.argv[0], | ||
[path.join(common.fixturesDir, 'recvfd.js'), | ||
SOCK_PATH]); | ||
var cp = child_process.spawn(process.argv[0], [path.join(common.fixturesDir, 'recvfd.js'), |
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.
Unrelated style change. Besides that, it will fail linting. Please don't ignore the friendly reminder to run make -j4 test
you can see in the pull request template :)
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.
I did, and it failed first time
I changed, it passed
Not sure how this happened
Fixing now, sorry :-)
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.
Sorry, my first ever contribution and didn't fully appreciate the style guide and the fact my IDE had made so many changes. All should be OK now. Thanks for your patience.
test/disabled/test-sendfd.js
Outdated
@@ -8,7 +8,7 @@ | |||
// persons to whom the Software is furnished to do so, subject to the | |||
// following conditions: | |||
// | |||
// The above copyright notice and this permission notice shall be included | |||
// The above copnotice and this permission notice shall be included |
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.
yes completely, do you want me to close and fix all of this?
test/disabled/test-sendfd.js
Outdated
var cp = child_process.spawn(process.argv[0], | ||
[path.join(common.fixturesDir, 'recvfd.js'), | ||
SOCK_PATH]); | ||
var cp = child_process.spawn(process.argv[0], [path.join(common.fixturesDir, 'recvfd.js'), |
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.
I did, and it failed first time
I changed, it passed
Not sure how this happened
Fixing now, sorry :-)
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.
LGTM, thanks!
test/disabled/test-sendfd.js
Outdated
@@ -8,7 +8,7 @@ | |||
// persons to whom the Software is furnished to do so, subject to the | |||
// following conditions: | |||
// | |||
// The above copyright notice and this permission notice shall be included | |||
// The above copnotice and this permission notice shall be included |
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.
This looks like an accident :)
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.
'twas, now reverted
test/disabled/test-sendfd.js
Outdated
const child_process = require('child_process'); | ||
const fs = require('fs'); | ||
const net = require('net'); | ||
var netBinding = process.binding('net'); | ||
const path = require('path'); | ||
|
||
var DATA = { | ||
'ppid' : process.pid, | ||
'ord' : 0 | ||
'ppid': process.pid, |
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.
Why the formatting changes?
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.
Auto beautifier - and the tests didn't pick it up.
I reverted all changes - should all be good now and know in future to turn that off or use your guide!
Sorry and thanks for this evening!
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.
now reverted :-)
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.
Thanks
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.
LGTM and thanks :)
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.
🥇
Removed require('buffer') from - test/disabled/test-sendfd.js - test/internet/test-dgram-broadcast-multi-process.js - test/pummel/test-https-no-reader.js PR-URL: #13860 Refs: #13836 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
Landed in e42b1b1, thank you for your first contribution! 🎉 CI on master: https://ci.nodejs.org/job/node-test-commit/10749/ |
Removed require('buffer') from - test/disabled/test-sendfd.js - test/internet/test-dgram-broadcast-multi-process.js - test/pummel/test-https-no-reader.js PR-URL: #13860 Refs: #13836 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
Removed require('buffer') from - test/disabled/test-sendfd.js - test/internet/test-dgram-broadcast-multi-process.js - test/pummel/test-https-no-reader.js PR-URL: #13860 Refs: #13836 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
Removed require('buffer') from - test/disabled/test-sendfd.js - test/internet/test-dgram-broadcast-multi-process.js - test/pummel/test-https-no-reader.js PR-URL: #13860 Refs: #13836 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
Removed require('buffer') from - test/disabled/test-sendfd.js - test/internet/test-dgram-broadcast-multi-process.js - test/pummel/test-https-no-reader.js PR-URL: #13860 Refs: #13836 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
Removed require('buffer') from - test/disabled/test-sendfd.js - test/internet/test-dgram-broadcast-multi-process.js - test/pummel/test-https-no-reader.js PR-URL: #13860 Refs: #13836 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
Removed require('buffer') from - test/disabled/test-sendfd.js - test/internet/test-dgram-broadcast-multi-process.js - test/pummel/test-https-no-reader.js PR-URL: #13860 Refs: #13836 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
Removed require('buffer') from - test/disabled/test-sendfd.js - test/internet/test-dgram-broadcast-multi-process.js - test/pummel/test-https-no-reader.js PR-URL: #13860 Refs: #13836 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
no need to
require('buffer')
in test files, so removed from:first ever contribution :-)
thanks to #goodnessSquad for the support and vision!
Refs: #13836
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test