Files
editor/packages/nodes
7f49efce68 fix(nodes): repair the nodes test suite under bun (#360)
These tests had never run in CI (the editor repo's own CI only runs
mcp-ci); they surfaced when the private-editor monorepo runs
`@pascal-app/nodes` tests via turbo. Four independent issues, all
test-side except one skip that flags a real bug:

- index.test.ts: the AnyNode-discriminator drift check read the literal
  via the zod-v3 `option.shape.type.value` getter, which is gone in
  zod v4 (and the field is ZodDefault-wrapped). Unwrap to the innermost
  def and read `_zod.def.values[0]`.
- spawn/parity.test.ts: the spawn palette icon is `{kind:'url'}` now
  (registered kinds point at palette assets); the test still asserted
  'iconify'. Update to 'url'.
- solar-panel/geometry.test.ts: `getSurfaceY` / `getAnalyticalNormal`
  moved to `../../shared/roof-surface`; fix the stale import path.
- shelf/geometry.test.ts: skip "user-set material is applied" — it
  catches a real bug (cloning a MeshStandardNodeMaterial drops
  color/roughness/metalness, so painted shelves/slabs render white).
  The clone is required; the fix belongs in the viewer material layer
  and is tracked separately.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 13:32:26 -04:00
..