@tscircuit/schematic-trace-solver 0.0.130 → 0.0.131
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.
- package/dist/index.d.ts +6 -0
- package/dist/index.js +210 -13
- package/lib/solvers/AvailableNetOrientationSolver/AvailableNetOrientationSolver.ts +290 -12
- package/package.json +1 -1
- package/tests/bug-reports/bug-report-20260811T075142Z/__snapshots__/bug-report-20260811T075142Z.snap.svg +32 -32
- package/tests/bug-reports/bug-report-20260811T075142Z/bug-report-20260811T075142Z.test.ts +119 -0
- package/tests/repros/__snapshots__/repro-board-589-regulator-section.snap.svg +69 -0
- package/tests/repros/__snapshots__/repro-usb-power-vbus-label-detour.snap.svg +467 -0
- package/tests/repros/assets/repro-board-589-regulator-section.input.json +270 -0
- package/tests/repros/assets/repro-usb-power-vbus-label-detour.input.json +2382 -0
- package/tests/repros/repro-board-589-regulator-section.test.ts +16 -0
- package/tests/repros/repro-usb-power-vbus-label-detour.test.ts +16 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import type { InputProblem } from "lib/types/InputProblem"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
import inputProblemJson from "./assets/repro-board-589-regulator-section.input.json"
|
|
6
|
+
|
|
7
|
+
test("board 589 regulator section trace routing", () => {
|
|
8
|
+
const inputProblem: InputProblem = JSON.parse(
|
|
9
|
+
JSON.stringify(inputProblemJson),
|
|
10
|
+
)
|
|
11
|
+
const solver = new SchematicTracePipelineSolver(inputProblem)
|
|
12
|
+
|
|
13
|
+
solver.solve()
|
|
14
|
+
|
|
15
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
16
|
+
})
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import type { InputProblem } from "lib/types/InputProblem"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
import inputProblemJson from "./assets/repro-usb-power-vbus-label-detour.input.json"
|
|
6
|
+
|
|
7
|
+
test("reproduces the usb power vbus label detour", () => {
|
|
8
|
+
const inputProblem: InputProblem = JSON.parse(
|
|
9
|
+
JSON.stringify(inputProblemJson),
|
|
10
|
+
)
|
|
11
|
+
const solver = new SchematicTracePipelineSolver(inputProblem)
|
|
12
|
+
|
|
13
|
+
solver.solve()
|
|
14
|
+
|
|
15
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
16
|
+
})
|