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

Function assertDecodeFailure

packages/effect/test/schema/Graph.test.ts:13–19  ·  view source on GitHub ↗
(input: unknown, path: string, message?: string)

Source from the content-addressed store, hash-verified

11const empty = (type: Graph.Kind) => ({ type, nodes: [], edges: [] })
12
13const assertDecodeFailure = (input: unknown, path: string, message?: string) => {
14 throws(() => decodeDirected(input), (error) => {
15 const formatted = globalThis.String(error)
16 assert.include(formatted, path)
17 if (message !== undefined) assert.include(formatted, message)
18 })
19}
20
21describe("Schema.Graph", () => {
22 it.effect("derives productive arbitrary graphs", () =>

Callers 1

Graph.test.tsFile · 0.85

Calls 1

throwsFunction · 0.90

Tested by

no test coverage detected