@tscircuit/schematic-trace-solver 0.0.185 → 0.0.187

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ import { expect, test } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "./bug-report-20260907T083336Z.json"
4
+ import "tests/fixtures/matcher"
5
+ import { tracePathContainsPoint } from "lib/solvers/RailNetLabelCornerPlacementSolver/geometry"
6
+ import type { InputProblem } from "lib/types/InputProblem"
7
+
8
+ test("bug-report-20260907T083336Z", () => {
9
+ const solver = new SchematicTracePipelineSolver(inputProblem as InputProblem)
10
+
11
+ solver.solve()
12
+
13
+ expect(solver.solved).toBe(true)
14
+ const traces = solver.netLabelToTraceSolver!.getOutput().traces
15
+ const r6 = traces.find(
16
+ (trace) => trace.mspPairId === "schematic_port_134-schematic_port_120",
17
+ )!
18
+ const capacitorRail = traces.find(
19
+ (trace) => trace.mspPairId === "schematic_port_132-schematic_port_134",
20
+ )!
21
+ expect(
22
+ tracePathContainsPoint(capacitorRail.tracePath, r6.tracePath.at(-1)!),
23
+ ).toBe(true)
24
+ expect(r6.tracePath.at(-1)!.y).toBeCloseTo(-3.135)
25
+
26
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
27
+ })