Skip to content

Commit

Permalink
chore: make tests pass on ipv4 only machine (#4997)
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <[email protected]>
  • Loading branch information
mcollina authored Aug 26, 2023
1 parent 7270c00 commit 8974714
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/custom-http-server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ const dns = require('dns').promises

test('Should support a custom http server', async t => {
const localAddresses = await dns.lookup('localhost', { all: true })
const minPlan = localAddresses.length - 1 || 1

t.plan((localAddresses.length - 1) + 3)
t.plan(minPlan + 3)

const serverFactory = (handler, opts) => {
t.ok(opts.serverFactory, 'it is called once for localhost')
Expand Down
3 changes: 2 additions & 1 deletion test/https/custom-https-server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ t.before(buildCertificate)

test('Should support a custom https server', async t => {
const localAddresses = await dns.lookup('localhost', { all: true })
const minPlan = localAddresses.length - 1 || 1

t.plan((localAddresses.length - 1) + 3)
t.plan(minPlan + 3)

const serverFactory = (handler, opts) => {
t.ok(opts.serverFactory, 'it is called once for localhost')
Expand Down

0 comments on commit 8974714

Please sign in to comment.