Skip to content

Commit 6962ebe

Browse files
committed
feat: add test for model orientation in circuit rendering
1 parent d44eebf commit 6962ebe

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
452 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { it, expect } from "bun:test"
2+
import { getTestFixture } from "./get-test-fixture"
3+
4+
it("should orient all models correctly", async () => {
5+
const { circuit } = await getTestFixture()
6+
7+
circuit.add(
8+
<board width="20mm" height="20mm">
9+
<resistor name="R1" resistance="10k" footprint="0402" />
10+
<resistor name="R2" resistance="10k" footprint="0402" />
11+
<resistor name="R3" resistance="10k" footprint="0402" />
12+
<resistor name="R4" resistance="10k" footprint="0402" />
13+
<resistor name="R5" resistance="10k" footprint="0402" />
14+
<resistor name="R6" resistance="10k" footprint="0402" />
15+
<resistor name="R7" resistance="10k" footprint="0402" />
16+
<resistor name="R8" resistance="10k" footprint="0402" />
17+
<resistor name="R9" resistance="10k" footprint="0402" />
18+
</board>,
19+
)
20+
circuit.render()
21+
await expect(circuit).toMatchSimple3dSnapshot(import.meta.path)
22+
})

0 commit comments

Comments
 (0)