MCPcopy
hub / github.com/TypeStrong/ts-node / errorPostprocessor

Function errorPostprocessor

src/test/testlib.ts:25–36  ·  view source on GitHub ↗
(fn: T)

Source from the content-addressed store, hash-verified

23const concurrencyLimiter = throat(16);
24
25function errorPostprocessor<T extends Function>(fn: T): T {
26 return async function (this: any) {
27 try {
28 return await fn.call(this, arguments);
29 } catch (error: any) {
30 delete error?.matcherResult;
31 // delete error?.matcherResult?.message;
32 if (error?.message) error.message = `\n${error.message}\n`;
33 throw error;
34 }
35 } as any;
36}
37
38function once<T extends Function>(func: T): T {
39 let run = false;

Callers 1

declareTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…