From 64f73cca5fb4618a251889792a661f333febe426 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 Use `common.mustNotCall()` to confirm that callback is not invoked when `dns.lookup()` throws. --- 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 9f56f21481d983..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.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(() => {