Skip to content

Commit

Permalink
test for bug alias
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Aug 29, 2024
1 parent bd56ed2 commit 3dd56e6
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/components/normal-components/chip-aliases.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { it, expect } from "bun:test"
import { Project } from "lib/Project"
import { Chip } from "lib/components/normal-components/Chip"
import "lib/register-catalogue"
import { getTestFixture } from "tests/fixtures/get-test-fixture"

it("should create a Chip component when using the <bug /> alias", async () => {
const { project } = getTestFixture()

project.add(
<board width="10mm" height="10mm">
<bug
name="U1"
footprint="soic8"
pinLabels={{
"1": "VCC",
"8": "GND",
}}
schPortArrangement={{
leftSize: 4,
rightSize: 4,
}}
/>
</board>,
)

project.render()

const chip = project.selectOne("chip") as Chip

expect(chip).not.toBeNull()
})

0 comments on commit 3dd56e6

Please sign in to comment.