node/test/parallel/test-dns-get-server.js
Rich Trott 6059cbedbd
test: remove unnecessary noop function args to mustCall()
PR-URL: https://github.com/nodejs/node/pull/45027
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.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: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-10-18 12:13:41 +00:00

12 lines
321 B
JavaScript

'use strict';
const common = require('../common');
const assert = require('assert');
const { Resolver } = require('dns');
const resolver = new Resolver();
assert(resolver.getServers().length > 0);
// return undefined
resolver._handle.getServers = common.mustCall();
assert.strictEqual(resolver.getServers().length, 0);