-
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: improve test coverage of dns/promises #41133
Conversation
7aa8603
to
53ad06e
Compare
Looks like there are some relevant test failures that need to be looked at! :-) |
0c67e16
to
a197004
Compare
}); | ||
|
||
assert.throws(() => { | ||
dnsPromises.lookup('127.0.0.1', { hints: '-1' }); |
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 test only check whether DeprecationWarning is emitted when hints
is not a number.
Since the valid string value of hints depends on the OS environment, give an invalid string value here and assert the error.
a197004
to
53771fb
Compare
This comment has been minimized.
This comment has been minimized.
Landed in 9b903d1 |
PR-URL: #41133 Refs: https://coverage.nodejs.org/coverage-18ff5832501b66b4/lib/internal/dns/promises.js.html#L116 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Qingyu Deng <i@ayase-lab.com>
@kuriyosh This caused a failed test when pulling into the v16.x release. Do you mind creating a backport PR? |
PR-URL: nodejs#41133 Refs: https://coverage.nodejs.org/coverage-18ff5832501b66b4/lib/internal/dns/promises.js.html#L116 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Qingyu Deng <i@ayase-lab.com>
@danielleadams |
This improves a test coverage in lib/internal/dns/promises.
It tests emitting warning when the options types of lookup method are invalid.
ref: https://coverage.nodejs.org/coverage-18ff5832501b66b4/lib/internal/dns/promises.js.html#L116