Skip to content

Commit

Permalink
Add another test for V4MAPPED
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed May 9, 2020
1 parent 664c2e9 commit fe0aa69
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test.js
Expand Up @@ -298,8 +298,15 @@ test('V4MAPPED hint', async t => {
await t.throwsAsync(cacheable.lookupAsync('static4', {family: 6}), {code: 'ENOTFOUND'});

// V4MAPPED
const entries = await cacheable.lookupAsync('static4', {family: 6, hints: V4MAPPED});
verify(t, entries, {address: '::ffff:127.0.0.1', family: 6});
{
const entries = await cacheable.lookupAsync('static4', {family: 6, hints: V4MAPPED});
verify(t, entries, {address: '::ffff:127.0.0.1', family: 6});
}

{
const entries = await cacheable.lookupAsync('localhost', {family: 6, hints: V4MAPPED});
verify(t, entries, {address: '::ffff:127.0.0.2', family: 6});
}
});

test('ALL hint', async t => {
Expand Down

0 comments on commit fe0aa69

Please sign in to comment.