MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / getDnsMock

Function getDnsMock

test/unit/utils-tests.js:258–269  ·  view source on GitHub ↗
(addressesOrErr)

Source from the content-addressed store, hash-verified

256});
257
258function getDnsMock(addressesOrErr) {
259 return {
260 resolve4: (name, cb) => {
261 if (Array.isArray(addressesOrErr)) {
262 // Use a copy of the addresses
263 process.nextTick(() => cb(null, Array.from(addressesOrErr)));
264 } else {
265 process.nextTick(() => cb(addressesOrErr));
266 }
267 }
268 };
269}

Callers 1

utils-tests.jsFile · 0.85

Calls 2

cbFunction · 0.85
fromMethod · 0.80

Tested by

no test coverage detected