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

Function getOutcome

test/parallel/test-crypto-negative-zero.js:11–17  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

9const { hasOpenSSL } = require('../common/crypto');
10
11function getOutcome(fn) {
12 try {
13 return { result: fn() };
14 } catch (err) {
15 return { err };
16 }
17}
18
19function assertSameOutcome(actual, expected) {
20 if (expected.err !== undefined) {

Callers 1

Calls 1

fnFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…