MCPcopy
hub / github.com/Effect-TS/effect / makeReversedUndirectedPath

Function makeReversedUndirectedPath

packages/effect/test/Graph.test.ts:4–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { Equal, Graph, Hash, Option } from "effect"
3
4const makeReversedUndirectedPath = () =>
5 Graph.undirected<string, number>((mutable) => {
6 const a = Graph.addNode(mutable, "A")
7 const b = Graph.addNode(mutable, "B")
8 const c = Graph.addNode(mutable, "C")
9 Graph.addEdge(mutable, a, b, 1)
10 Graph.addEdge(mutable, c, b, 1)
11 })
12
13const expectSomePath = <E>(result: Option.Option<Graph.PathResult<E>>, expected: Graph.PathResult<E>) => {
14 expect(Option.isSome(result)).toBe(true)

Callers 1

Graph.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected