Skip to content
Closed
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
test: check callback not invoked on lookup error
Use `common.mustNotCall()` to confirm that callback is not invoked when
`dns.lookup()` throws.
  • Loading branch information
Trott committed Jun 4, 2017
commit 64f73cca5fb4618a251889792a661f333febe426
4 changes: 2 additions & 2 deletions test/parallel/test-dns-lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ assert.throws(() => {
hints: 100,
family: 0,
all: false
}, common.noop);
}, common.mustNotCall());
}, /^TypeError: Invalid argument: hints must use valid flags$/);

assert.throws(() => {
dns.lookup(false, {
hints: 0,
family: 20,
all: false
}, common.noop);
}, common.mustNotCall());
}, /^TypeError: Invalid argument: family must be 4 or 6$/);

assert.doesNotThrow(() => {
Expand Down