★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/27299Nouvelle recherche | Portail wanayoo
Skip to content
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: increase coverage for dns.promises.lookup() #27299

Closed
wants to merge 3 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Apr 18, 2019

Add coverage for uv_getaddrinfo() returning an error.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Add coverage for uv_getaddrinfo() returning an error.
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 18, 2019

@Trott
Copy link
Member Author

@Trott Trott commented Apr 18, 2019

This adds coverage for

reject(dnsException(err, 'getaddrinfo', hostname));
.

Copy link
Member

@mhdawson mhdawson left a comment

LGTM

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 18, 2019

assert.strictEqual(error.code, 'ENOMEM');
assert.strictEqual(error.hostname, 'example.com');
})
);
Copy link
Member

@BridgeAR BridgeAR Apr 19, 2019

Choose a reason for hiding this comment

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

Please use assert.rejects instead.

Copy link
Member Author

@Trott Trott Apr 19, 2019

Choose a reason for hiding this comment

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

Sure, done.

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 19, 2019

@Trott
Copy link
Member Author

@Trott Trott commented Apr 21, 2019

Landed in 7167eb2

@Trott Trott closed this Apr 21, 2019
Trott added a commit to Trott/io.js that referenced this issue Apr 21, 2019
Add coverage for uv_getaddrinfo() returning an error.

PR-URL: nodejs#27299
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@Trott Trott deleted the promise-coverage branch Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants