Skip to content

Commit 543d2de

Browse files
TrottMylesBorins
authored andcommitted
test: check callback not invoked on lookup error
Use `common.mustNotCall()` to confirm that callback is not invoked when `dns.lookup()` throws. PR-URL: #13456 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent 91fb0cb commit 543d2de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-dns-lookup.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ assert.throws(() => {
2424
hints: 100,
2525
family: 0,
2626
all: false
27-
}, () => {});
27+
}, common.mustNotCall());
2828
}, /^TypeError: Invalid argument: hints must use valid flags$/);
2929

3030
assert.throws(() => {
3131
dns.lookup(false, {
3232
hints: 0,
3333
family: 20,
3434
all: false
35-
}, () => {});
35+
}, common.mustNotCall());
3636
}, /^TypeError: Invalid argument: family must be 4 or 6$/);
3737

3838
assert.doesNotThrow(() => {

0 commit comments

Comments
 (0)