Skip to content

Commit

Permalink
type check fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
imrishabh18 committed Aug 13, 2024
1 parent 8f6c578 commit 260c688
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/tracehint/trace-hint-1.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from "ava"
import { su } from "@tscircuit/soup-util"
import test from "ava"
import { getTestFixture } from "tests/fixtures/get-test-fixture"

test("trace hint 1: basic trace_hint for pad", async (t) => {
Expand All @@ -26,8 +26,12 @@ test("trace hint 1: basic trace_hint for pad", async (t) => {
// waiting for select
const pcb_port = su(soup).pcb_port.select(".R1 > .left")!

t.is(trace_hint.route[0].x, pcb_port.x - 1)
t.is(trace_hint.route[0].y, pcb_port.y + 1)
if (pcb_port) {
t.is(trace_hint.route[0]?.x, pcb_port.x - 1)
t.is(trace_hint.route[0]?.y, pcb_port.y + 1)
} else {
t.fail("pcb_port is undefined")
}

logSoup(soup)
})

0 comments on commit 260c688

Please sign in to comment.