MCPcopy
hub / github.com/cloudflare/capnweb / roundTrip

Function roundTrip

__tests__/index.test.ts:209–211  ·  view source on GitHub ↗
(err: Error)

Source from the content-addressed store, hash-verified

207
208describe("error serialization", () => {
209 function roundTrip(err: Error): Error & Record<string, unknown> {
210 return deserialize(serialize(err)) as unknown as Error & Record<string, unknown>;
211 }
212
213 it("preserves dynamically-attached own properties", () => {
214 let err = new Error("the message") as Error & Record<string, unknown>;

Callers 1

index.test.tsFile · 0.85

Calls 2

deserializeFunction · 0.50
serializeFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…