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

Fix address util test for loopback of ipv6 #1095

Merged
merged 2 commits into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
"before": true
}
],
"linebreak-style": [
"warn",
"unix"
],
"max-len": [
"warn",
{
Expand Down
8 changes: 4 additions & 4 deletions test/unit/util/AddressUtilTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ describe('AddressUtilTest', function () {
expect(result).to.be.false;
});

it('resolveAddress: returns IPv4 for localhost with port', async function () {
it('resolveAddress: returns loopback address for localhost with port', async function () {
const result = await resolveAddress('localhost:5701');
expect(result).to.be.equal('127.0.0.1');
expect(result).to.satisfy(ip => ip === '127.0.0.1' || ip === '::1');
});

it('resolveAddress: returns IPv4 for localhost without port', async function () {
it('resolveAddress: returns loopback address for localhost without port', async function () {
const result = await resolveAddress('localhost');
expect(result).to.be.equal('127.0.0.1');
expect(result).to.satisfy(ip => ip === '127.0.0.1' || ip === '::1');
});

it('resolveAddress: returns IPv4 for IPv4 address with port', async function () {
Expand Down