Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
techmannih committed Jan 10, 2025
1 parent 375bccc commit a7b157f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 40 deletions.
4 changes: 0 additions & 4 deletions test-results/.last-run.json

This file was deleted.

43 changes: 7 additions & 36 deletions tests/pcb/pill-smtpad.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { convertCircuitJsonToPcbSvg } from "lib"
test("pill smtpad shape", () => {
expect(
convertCircuitJsonToPcbSvg([
// Test 1: Standard pill with equal width and height
{
type: "pcb_smtpad",
x: 0,
Expand All @@ -13,61 +12,33 @@ test("pill smtpad shape", () => {
shape: "pill",
width: 1,
height: 1,
radius: 0.2, // Rounded corners
radius: 0.2,
pcb_smtpad_id: "test_pad_1",
},

// Test 2: Pill with different width and height
{
type: "pcb_smtpad",
x: 5,
y: 5,
layer: "top" as const,
shape: "pill",
width: 1.5, // Wider pill
height: 1, // Same height
radius: 0.3, // Larger rounded corners
width: 1.5,
height: 1,
radius: 0.3,
pcb_smtpad_id: "test_pad_2",
},

// Test 3: Pill with larger height than width
{
type: "pcb_smtpad",
x: -5,
y: -5,
layer: "top" as const,
shape: "pill",
width: 1, // Narrower width
height: 2, // Taller pill
radius: 0.4, // Large rounded corners
width: 1,
height: 2,
radius: 0.4,
pcb_smtpad_id: "test_pad_3",
},

// Test 4: Pill with smaller radius
{
type: "pcb_smtpad",
x: -5,
y: 5,
layer: "top" as const,
shape: "pill",
width: 1.5,
height: 1.5,
radius: 0.1, // Small rounded corners
pcb_smtpad_id: "test_pad_4",
},

// Test 5: Very large pill shape
{
type: "pcb_smtpad",
x: 5,
y: -5,
layer: "top" as const,
shape: "pill",
width: 3, // Much wider pill
height: 2, // Much taller pill
radius: 0.5, // Larger rounded corners
pcb_smtpad_id: "test_pad_5",
},
]),
).toMatchSvgSnapshot(import.meta.path)
})

0 comments on commit a7b157f

Please sign in to comment.