From 543d2de700915894f8781e6f94ce618455e77ca6 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 4 Jun 2017 11:19:05 -0700 Subject: [PATCH] test: check callback not invoked on lookup error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Anna Henningsen Reviewed-By: Refael Ackermann Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Gibson Fahnestock --- test/parallel/test-dns-lookup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-dns-lookup.js b/test/parallel/test-dns-lookup.js index a720c46e02a630..a1fad873e33f37 100644 --- a/test/parallel/test-dns-lookup.js +++ b/test/parallel/test-dns-lookup.js @@ -24,7 +24,7 @@ assert.throws(() => { hints: 100, family: 0, all: false - }, () => {}); + }, 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.mustNotCall()); }, /^TypeError: Invalid argument: family must be 4 or 6$/); assert.doesNotThrow(() => {