Skip to content

Commit

Permalink
fix not accepting "rect"
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Jun 4, 2024
1 parent 365beaf commit 99269f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/kicad-zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const property_def = z.object({
export const pad_def = z.object({
name: z.string(),
pad_type: z.literal("smd"),
pad_shape: z.enum(["roundrect", "circle"]),
pad_shape: z.enum(["roundrect", "circle", "rect"]),
at: point,
size: point2,
layers: z.array(z.string()).optional(),
Expand Down
13 changes: 13 additions & 0 deletions tests/kicad-file-tests/anaren.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import test from "ava"
import { parseKicadModToTscircuitSoup } from "src"
import { getTestFixture } from "tests/fixtures/get-test-fixture"

test("Anaren_0805_2012Metric-6.kicad_mod", async (t) => {
const fixture = await getTestFixture(t)
const fileContent = fixture.getKicadFile("Anaren_0805_2012Metric-6.kicad_mod")

const soup = await parseKicadModToTscircuitSoup(fileContent)

await fixture.logSoup(soup)
t.pass()
})

0 comments on commit 99269f4

Please sign in to comment.