-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 test for dgram.setTTL #2121
Conversation
LGTM |
The CI failures so far seem unrelated. |
socket.bind(common.PORT); | ||
socket.on('listening', function() { | ||
var result = socket.setTTL(16); | ||
assert.equal(result, 16); |
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.
nit: could be assert.strictEqual(socket.setTTL(16), 16);
Or if that's less readable, another const
. :)
Also, isn't it better to use strictEqual
for this kind of stuff?
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.
good point
Verify that passing a non-number will throw and that the argument is returned on success. PR-URL: nodejs#2121 Reviewed-By: Colin Ihrig <[email protected]>
Landed in 842eb5b. Thanks! |
Verify that passing a non-number will throw and that the argument is
returned on success.
There currently is not a test to verify this functionality.