MCPcopy Index your code
hub / github.com/nodejs/node / allowFailed

Function allowFailed

test/parallel/test-dns-set-default-order.js:24–28  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

22// We want to test the parameter of order only so that we
23// ignore possible errors here.
24function allowFailed(fn) {
25 return fn.catch((_err) => {
26 //
27 });
28}
29
30assert.throws(() => dns.setDefaultResultOrder('my_order'), {
31 code: 'ERR_INVALID_ARG_VALUE',

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…