Skip to content

Commit

Permalink
schematic chip snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Sep 21, 2024
1 parent 5498ccd commit 4ef6de8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/sch/__snapshots__/chip.snap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions tests/sch/chip.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { test, expect } from "bun:test"
import { Circuit } from "@tscircuit/core"
import { convertCircuitJsonToSchematicSvg } from "lib/index"

test("schematic chip", () => {
const circuit = new Circuit()
circuit.add(
<board width="20mm" height="20mm">
<chip name="U1" footprint="dip8" />
</board>,
)

expect(
convertCircuitJsonToSchematicSvg(circuit.getCircuitJson()),
).toMatchSvgSnapshot(import.meta.path)
})

0 comments on commit 4ef6de8

Please sign in to comment.