Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test: add tests to check error in dns.lookupService. #22908

Closed
wants to merge 2 commits into from

Conversation

shisama
Copy link
Contributor

@shisama shisama commented Sep 17, 2018

Added tests to check error in dns.lookupService to
increase coverage.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Added tests to check error in dns.lookupService to
increase coverage.
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Sep 17, 2018
@starkwang
Copy link
Contributor

const dns = require('dns');

// Stub `getnameinfo` to *always* error.
cares.getnameinfo = () => internalBinding('uv').UV_ENOENT;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: uv could be assigned to a variable.

@danbev
Copy link
Contributor

danbev commented Sep 20, 2018

Landed in 0623aab.

@danbev danbev closed this Sep 20, 2018
danbev pushed a commit that referenced this pull request Sep 20, 2018
Added tests to check error in dns.lookupService to
increase coverage.

PR-URL: #22908
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Sep 20, 2018
Added tests to check error in dns.lookupService to
increase coverage.

PR-URL: #22908
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants