mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
test: check callback not invoked on lookup error
Use `common.mustNotCall()` to confirm that callback is not invoked when `dns.lookup()` throws. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
8d2bd5fa88
commit
c20c570282
1 file changed
+2
-2
@@ -24,7 +24,7 @@ assert.throws(() => {
|
||||
hints: 100,
|
||||
family: 0,
|
||||
all: false
|
||||
}, common.noop);
|
||||
}, common.mustNotCall());
|
||||
}, /^TypeError: Invalid argument: hints must use valid flags$/);
|
||||
|
||||
assert.throws(() => {
|
||||
@@ -32,7 +32,7 @@ assert.throws(() => {
|
||||
hints: 0,
|
||||
family: 20,
|
||||
all: false
|
||||
}, common.noop);
|
||||
}, common.mustNotCall());
|
||||
}, /^TypeError: Invalid argument: family must be 4 or 6$/);
|
||||
|
||||
assert.doesNotThrow(() => {
|
||||
|
||||
Reference in new issue
Block a user