Skip to content

Commit fe5ea3f

Browse files
Trottaddaleax
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 <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
1 parent 216cb3f commit fe5ea3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-dns-lookup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ assert.throws(() => {
2424
hints: 100,
2525
family: 0,
2626
all: false
27-
}, common.noop);
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-
}, common.noop);
35+
}, common.mustNotCall());
3636
}, /^TypeError: Invalid argument: family must be 4 or 6$/);
3737

3838
assert.doesNotThrow(() => {

0 commit comments

Comments
 (0)