MCPcopy
hub / github.com/remix-run/remix / capture

Function capture

packages/assert/src/lib/assert.test.ts:770–777  ·  view source on GitHub ↗
(fn: () => void)

Source from the content-addressed store, hash-verified

768})
769
770function capture(fn: () => void): nodeAssert.AssertionError | null {
771 try {
772 fn()
773 return null
774 } catch (e) {
775 return e as nodeAssert.AssertionError
776 }
777}
778
779async function captureAsync(fn: () => Promise<void>): Promise<nodeAssert.AssertionError | null> {
780 try {

Callers 1

assert.test.tsFile · 0.70

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…