MCPcopy
hub / github.com/callstack/react-native-testing-library / copyStackTraceIfNeeded

Function copyStackTraceIfNeeded

src/helpers/errors.ts:11–15  ·  view source on GitHub ↗
(target: unknown, stackTraceSource: Error | undefined)

Source from the content-addressed store, hash-verified

9}
10
11export function copyStackTraceIfNeeded(target: unknown, stackTraceSource: Error | undefined) {
12 if (stackTraceSource != null && target instanceof Error && stackTraceSource.stack) {
13 target.stack = stackTraceSource.stack.replace(stackTraceSource.message, target.message);
14 }
15}

Callers 4

waitForInternalFunction · 0.90
checkRealTimersCallbackFunction · 0.90
handleTimeoutFunction · 0.90
errors.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…