MCPcopy Create free account
hub / github.com/Effect-TS/effect / captureSerializationError

Function captureSerializationError

packages/rpc/test/RpcSerialization.test.ts:61–69  ·  view source on GitHub ↗
(decode: () => unknown)

Source from the content-addressed store, hash-verified

59}
60
61const captureSerializationError = (decode: () => unknown) => {
62 try {
63 decode()
64 } catch (error) {
65 assert(error instanceof RpcSerialization.RpcSerializationError)
66 return error
67 }
68 return assert.fail("Expected an RpcSerializationError")
69}
70
71describe("RpcSerialization", () => {
72 describe("ndjson", () => {

Callers 1

Calls 3

failMethod · 0.65
decodeFunction · 0.50
assertFunction · 0.50

Tested by

no test coverage detected