From 190bb204a0a51275d04dd830ceb207c8b28c73e4 Mon Sep 17 00:00:00 2001 From: David Montero Date: Thu, 11 Jun 2026 04:19:35 +0200 Subject: [PATCH] test(spice): exclude custom-chip from the static-fixture catalog check The `custom-chip` SPICE mapper emits its sources from getChipDrivenPins() (the chip's live driven output pins), so a static pin/property fixture can never exercise it -- it always returns null. The "every mapped metadataId has a test fixture" check flagged it as missing a fixture, failing the suite. Exclude it via a RUNTIME_STATE_MAPPERS set; custom-chip SPICE behaviour is covered by the chip-bus integration tests. Pre-existing since 4cb5748 (custom-chip first-class circuit nodes). --- frontend/src/__tests__/component-to-spice.test.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/__tests__/component-to-spice.test.ts b/frontend/src/__tests__/component-to-spice.test.ts index d0e6351a..1f0b37c1 100644 --- a/frontend/src/__tests__/component-to-spice.test.ts +++ b/frontend/src/__tests__/component-to-spice.test.ts @@ -222,9 +222,18 @@ describe('PASSIVE_PRESETS — preset variants share their base mapper', () => { }); }); +// Mappers whose output depends on live runtime state rather than the static +// component (pins + properties) a fixture can describe. `custom-chip` emits its +// SPICE sources from getChipDrivenPins(comp.id) — the chip's currently-driven +// output pins — so a static fixture always yields null. It is exercised by the +// chip-bus integration tests instead, not this catalog harness. +const RUNTIME_STATE_MAPPERS = new Set(['custom-chip']); + describe('componentToSpice — catalog completeness', () => { it('every mapped metadataId has a test fixture', () => { - const missing = mappedMetadataIds().filter((id) => !MINIMAL_FIXTURES[id]); + const missing = mappedMetadataIds().filter( + (id) => !MINIMAL_FIXTURES[id] && !RUNTIME_STATE_MAPPERS.has(id), + ); expect(missing, `Missing fixtures for: ${missing.join(', ')}`).toEqual([]); });