-
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: add dgram.Socket.prototype.bind's test #10894
Conversation
@@ -5,7 +5,11 @@ const dgram = require('dgram'); | |||
|
|||
const socket = dgram.createSocket('udp4'); | |||
|
|||
socket.on('listening', function() { | |||
socket.on('listening', () => { |
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.
Perhaps wrap the callback in common.mustCall()
?
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. Added.
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 with @mscdex's comment addressed.
faa7fa1
to
ac999d3
Compare
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
Landed in ff75e21 |
Test that an error is thrown when bind() is called on an already bound socket. PR-URL: #10894 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Test that an error is thrown when bind() is called on an already bound socket. PR-URL: #10894 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Test that an error is thrown when bind() is called on an already bound socket. PR-URL: nodejs#10894 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Test that an error is thrown when bind() is called on an already bound socket. PR-URL: nodejs#10894 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Test that an error is thrown when bind() is called on an already bound socket. PR-URL: #10894 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Test that an error is thrown when bind() is called on an already bound socket. PR-URL: #10894 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Test that an error is thrown when bind() is called on an already bound socket. PR-URL: #10894 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Test that an error is thrown when bind() is called on an already bound socket. PR-URL: #10894 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
bind: https://github.com/nodejs/node/blob/master/lib/dgram.js#L140
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test