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

Function thrownCodecError

packages/sql/pg/test/PgTypes.test.ts:47–55  ·  view source on GitHub ↗
(run: () => unknown)

Source from the content-addressed store, hash-verified

45}
46
47const thrownCodecError = (run: () => unknown): PgTypesResult.CodecError => {
48 try {
49 run()
50 } catch (error) {
51 assert.instanceOf(error, PgTypesResult.CodecError)
52 return error as PgTypesResult.CodecError
53 }
54 return assert.fail("Expected PgTypesCodecError to be thrown")
55}
56
57/** Every value below was produced by PostgreSQL for the encoded parameter. */
58const roundTrips: Array<{

Callers 1

PgTypes.test.tsFile · 0.85

Calls 2

failMethod · 0.65
runFunction · 0.50

Tested by

no test coverage detected