diff --git a/tests/components/normal-components/__snapshots__/resonator-default-schematic.snap.svg b/tests/components/normal-components/__snapshots__/resonator-default-schematic.snap.svg
deleted file mode 100644
index de605753a..000000000
--- a/tests/components/normal-components/__snapshots__/resonator-default-schematic.snap.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-
\ No newline at end of file
diff --git a/tests/components/normal-components/__snapshots__/resonator-no-ground-schematic.snap.svg b/tests/components/normal-components/__snapshots__/resonator-no-ground-schematic.snap.svg
deleted file mode 100644
index 6fc732efb..000000000
--- a/tests/components/normal-components/__snapshots__/resonator-no-ground-schematic.snap.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-
\ No newline at end of file
diff --git a/tests/components/normal-components/__snapshots__/resonator-single-ground-schematic.snap.svg b/tests/components/normal-components/__snapshots__/resonator-single-ground-schematic.snap.svg
deleted file mode 100644
index ec7f586ae..000000000
--- a/tests/components/normal-components/__snapshots__/resonator-single-ground-schematic.snap.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-
\ No newline at end of file
diff --git a/tests/components/normal-components/__snapshots__/resonator-two-ground-schematic.snap.svg b/tests/components/normal-components/__snapshots__/resonator-two-ground-schematic.snap.svg
deleted file mode 100644
index ae236e9bd..000000000
--- a/tests/components/normal-components/__snapshots__/resonator-two-ground-schematic.snap.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-
\ No newline at end of file
diff --git a/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-default-schematic.snap.svg b/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-default-schematic.snap.svg
deleted file mode 100644
index 6418a51fe..000000000
--- a/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-default-schematic.snap.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-
\ No newline at end of file
diff --git a/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-no-ground-schematic.snap.svg b/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-no-ground-schematic.snap.svg
deleted file mode 100644
index 85bf71977..000000000
--- a/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-no-ground-schematic.snap.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-
\ No newline at end of file
diff --git a/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-single-ground-schematic.snap.svg b/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-single-ground-schematic.snap.svg
deleted file mode 100644
index 81b5910c9..000000000
--- a/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-single-ground-schematic.snap.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-
\ No newline at end of file
diff --git a/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-symbols-schematic.snap.svg b/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-symbols-schematic.snap.svg
new file mode 100644
index 000000000..0b9ec616b
--- /dev/null
+++ b/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-symbols-schematic.snap.svg
@@ -0,0 +1,20 @@
+
\ No newline at end of file
diff --git a/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-two-ground-schematic.snap.svg b/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-two-ground-schematic.snap.svg
deleted file mode 100644
index 9eb1be34d..000000000
--- a/tests/components/normal-components/__snapshots__/resonator.test.tsx-resonator-two-ground-schematic.snap.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-
\ No newline at end of file
diff --git a/tests/components/normal-components/resonator.test.tsx b/tests/components/normal-components/resonator.test.tsx
index 87c972f62..ee51314d0 100644
--- a/tests/components/normal-components/resonator.test.tsx
+++ b/tests/components/normal-components/resonator.test.tsx
@@ -1,71 +1,66 @@
import { it, expect, describe } from "bun:test"
import { getTestFixture } from "tests/fixtures/get-test-fixture"
-describe("Resonator Component", () => {
- it("should render a resonator with no ground pins", async () => {
+describe("Resonator symbol variants (single snapshot)", () => {
+ it("arranges all variants via schX/schY and renders once", async () => {
const { circuit } = getTestFixture()
- circuit.add(
-
-
- ,
- )
- circuit.render()
- expect(circuit).toMatchSchematicSnapshot(
- import.meta.path + "-resonator-no-ground",
- )
- })
- it("should render a resonator with single ground pin", async () => {
- const { circuit } = getTestFixture()
- circuit.add(
-
-
- ,
- )
- circuit.render()
- expect(circuit).toMatchSchematicSnapshot(
- import.meta.path + "-resonator-single-ground",
- )
- })
+ const placements = [
+ {
+ name: "K1",
+ frequency: "1MHz",
+ loadCapacitance: "20pF",
+ pinVariant: "no_ground" as const,
+ schX: 0,
+ schY: 0,
+ },
+ {
+ name: "K2",
+ frequency: "16MHz",
+ loadCapacitance: "22pF",
+ pinVariant: "ground_pin" as const,
+ schX: 4,
+ schY: 0,
+ },
+ {
+ name: "K3",
+ frequency: "32MHz",
+ loadCapacitance: "18pF",
+ pinVariant: "two_ground_pins" as const,
+ schX: 0,
+ schY: 3,
+ },
+ {
+ // default (no pinVariant)
+ name: "K4",
+ frequency: "8MHz",
+ loadCapacitance: "15pF",
+ pinVariant: undefined,
+ schX: 4,
+ schY: 3,
+ },
+ ]
- it("should render a resonator with two ground pins", async () => {
- const { circuit } = getTestFixture()
circuit.add(
-
+ {placements.map((p) => (
+
+ ))}
,
)
- circuit.render()
- expect(circuit).toMatchSchematicSnapshot(
- import.meta.path + "-resonator-two-ground",
- )
- })
- it("should render a resonator without pinVariant specified", async () => {
- const { circuit } = getTestFixture()
- circuit.add(
-
-
- ,
- )
circuit.render()
+
expect(circuit).toMatchSchematicSnapshot(
- import.meta.path + "-resonator-default",
+ import.meta.path + "-resonator-symbols",
)
})
})