autorouting phase tolerances#660
Conversation
| test("supports shared routing tolerances", () => { | ||
| const raw: RoutingTolerances = { | ||
| minTraceWidth: "0.12mm", | ||
| minViaHoleEdgeToViaHoleEdgeClearance: "0.2mm", | ||
| minPlatedHoleDrillEdgeToDrillEdgeClearance: "0.25mm", | ||
| minTraceToPadEdgeClearance: "0.16mm", | ||
| minPadEdgeToPadEdgeClearance: "0.18mm", | ||
| minBoardEdgeClearance: "0.4mm", | ||
| minViaEdgeToPadEdgeClearance: "0.14mm", | ||
| minViaHoleDiameter: "0.3mm", | ||
| minViaPadDiameter: "0.6mm", | ||
| } | ||
|
|
||
| const result = routingTolerances.parse(raw) | ||
| expect(result.minTraceWidth).toBe(0.12) | ||
| expect(result.minViaPadDiameter).toBe(0.6) | ||
| }) |
There was a problem hiding this comment.
The rule states that a *.test.ts file may have AT MOST one test(...), and after that the user should split into multiple, numbered files (e.g., add1.test.ts, add2.test.ts). The file tests/autorouter.test.ts already had at least one test(...) block before this PR, and this diff adds a second test("supports shared routing tolerances", ...) call. This violates the one-test-per-file rule. The new test should be moved to a separate file, e.g., tests/autorouter2.test.ts (and the existing tests renumbered accordingly, e.g., autorouter1.test.ts).
Spotted by Graphite (based on custom rule: Custom rule)
Is this helpful? React 👍 or 👎 to let us know.
| test("autorouting phase accepts routing tolerances", () => { | ||
| const raw: AutoroutingPhaseProps = { | ||
| phaseIndex: 0, | ||
| minTraceWidth: "0.12mm", | ||
| minViaHoleEdgeToViaHoleEdgeClearance: "0.2mm", | ||
| minPlatedHoleDrillEdgeToDrillEdgeClearance: "0.25mm", | ||
| minTraceToPadEdgeClearance: "0.16mm", | ||
| minPadEdgeToPadEdgeClearance: "0.18mm", | ||
| minBoardEdgeClearance: "0.4mm", | ||
| minViaEdgeToPadEdgeClearance: "0.14mm", | ||
| minViaHoleDiameter: "0.3mm", | ||
| minViaPadDiameter: "0.6mm", | ||
| } | ||
|
|
||
| const parsed = autoroutingPhaseProps.parse(raw) | ||
| expect(parsed.minTraceWidth).toBe(0.12) | ||
| expect(parsed.minViaPadDiameter).toBe(0.6) | ||
| }) |
There was a problem hiding this comment.
The rule states that a *.test.ts file may have AT MOST one test(...). The file tests/autoroutingphase.test.ts already contained at least one test(...) block before this PR (visible at lines 35–37 and 38–57 in the diff), and this diff adds another test("autorouting phase accepts routing tolerances", ...) call. This violates the one-test-per-file rule. The new test (and any others beyond the first) should be moved to separate numbered files, e.g., autoroutingphase1.test.ts, autoroutingphase2.test.ts, etc.
Spotted by Graphite (based on custom rule: Custom rule)
Is this helpful? React 👍 or 👎 to let us know.
|
CC @imrishabh18 @ShiboSoftwareDev could use help w/ pushing this through to implementation this PR enables autoroutingphase to specify the DRC requirements for the autorouter- this can be used to enforce a different minimum trace width for example |
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
Uh oh!
There was an error while loading. Please reload this page.