-
$ git diff test/parallel/test-dns-promises-exists.js
diff --git a/test/parallel/test-dns-promises-exists.js b/test/parallel/test-dns-promises-exists.js
index 5fd20dff2c..814ea2c69e 100644
--- a/test/parallel/test-dns-promises-exists.js
+++ b/test/parallel/test-dns-promises-exists.js
@@ -2,5 +2,6 @@
require('../common');
const assert = require('assert');
-
+console.log('dnsPromises.setDefaultResultOrder is: ', require('dns/promises').setDefaultResultOrder)
+console.log('dns.promises.setDefaultResultOrder is: ', require('dns').promises.setDefaultResultOrder)
assert.strictEqual(require('dns/promises'), require('dns').promises);
$ ./out/Release/node test/parallel/test-dns-promises-exists.js
dnsPromises.setDefaultResultOrder is: undefined
dns.promises.setDefaultResultOrder is: [Function: setDefaultResultOrder]
This make Could anybody guide me on how to improve the test to make
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
When you write There's a bug in the code where properties are added to Lines 382 to 391 in b5ed1bd I think that was added at a time where node:dns/promises did not exist and require('node:dns').promises was the only way of accessing the promise API. Would you be interested in sending a PR fixing this?
|
Beta Was this translation helpful? Give feedback.
When you write
fs/promises
, do you meandns/promises
? I'm going to assume that yes, but you wrote it four times in a row, so not sure.There's a bug in the code where properties are added to
node:dns/promises
only if someone tries to accessrequire('node:dns').promises
:node/lib/dns.js
Lines 382 to 391 in b5ed1bd
I think that was added at a time where
node…