fix: resolve 8 test failures (stair fixtures, spawn icon, Zod v4 introspection, three-mesh-bvh)#329
Open
jelharou wants to merge 1 commit into
Open
Conversation
Three root causes addressed: - stair-opening-sync tests (×4): manualOpening fixtures used z ∈ [0.8, 2.9] but the computed stair opening expands to z ∈ [0.05, 2.95] (position[2]=0.2 minus openingOffset=0.15). isCoveredByExistingHole requires full containment, so the auto-hole was not suppressed. Fixtures updated to z ∈ [0, 3]. - spawn parity test (×1): commit 6a1d853 switched all icon refs from iconify to url kind; test assertion still expected 'iconify'. Updated to 'url'. - builtinPlugin discriminator test (×1): nodeType() wraps z.literal(kind) in ZodDefault so nodes parse without an explicit type field. In Zod v4, ZodDefault has no .value; test assumed a bare ZodLiteral (Zod v3). Fixed introspection to unwrap via .def?.innerType before reading .value. - geometry.test.ts (×2 errors): shelf v2 added @pascal-app/viewer import to geometry.ts; the viewer barrel transitively loads three-bvh-csg → three-mesh-bvh @0.9.9 UMD, which has a class-init-order bug in Bun's test env. Added bunfig.toml + test-preload.ts to mock three-bvh-csg globally (no test exercises CSG at runtime). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes all 8 test failures that appeared after pulling the latest
main(shelf v2, IconRef url kind, StairOpeningSystem commits). Four distinct root causes:1.
stair-opening-synctests (4 failures)manualOpeningfixtures usedz ∈ [0.8, 2.9]but the computed stair opening expands toz ∈ [0.05, 2.95](position[2]=0.2minusopeningOffset=0.15).isCoveredByExistingHolerequires full polygon containment, so the auto-hole was not suppressed. Fixtures updated toz ∈ [0, 3].2. Spawn parity test (1 failure)
Commit
6a1d853(IconRef: addurlkind) changed all registered icon refs from{ kind: 'iconify' }to{ kind: 'url' }. Test assertion still expected'iconify'. Updated to'url'.3.
builtinPlugindiscriminator test (1 failure)nodeType()wrapsz.literal(kind)inZodDefaultso nodes parse without an explicittypefield. In Zod v4,ZodDefaulthas no.valueproperty — the test was written for Zod v3's bareZodLiteral. Fixed introspection to unwrap via.def?.innerTypebefore reading.value.4.
geometry.test.tserrors (2 errors)Shelf v2 added
import … from '@pascal-app/viewer'togeometry.ts. The viewer barrel transitively loadswall-system→three-bvh-csg→three-mesh-bvh@0.9.9as CJS/UMD (becausethree-bvh-csglacksexportsconditions). That UMD has a class-initialization-order bug in Bun's test environment. Addedbunfig.toml+test-preload.tsto mockthree-bvh-csgglobally — no test exercises CSG at runtime, so this is safe.How to test
git fetch fork fix/test-failures-after-pull && git checkout fix/test-failures-after-pullbun testfrom the repo rootScreenshots / screen recording
N/A — non-visual change (test fixes only).
Checklist
bun devbun checkto verify)mainbranch