Skip to content

Stub blob URLs unconditionally, so the vitest 5.0.1 + jsdom 30.1 pair cannot break the configurator tests - #114

Merged
dimmus merged 1 commit into
mainfrom
claude/vitest-blob-url-double
Sep 24, 2026
Merged

dimmus merged 1 commit into
mainfrom
claude/vitest-blob-url-double

Conversation

@dimmus

@dimmus dimmus commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Unblocks #110. Rebased onto the fixed main, the frontend patch group still failed Tests: 24 configurator cases with TypeError: Cannot read properties of undefined (reading '_buffer') from URL.createObjectURL. Vitest 5.0.1's jsdom compatibility layer reads a private _buffer off jsdom's Blob; jsdom 30.1.0 renamed it. Upstream: vitest-dev/vitest#11336, fixed by #11295, unreleased. The two land together in #110 because Dependabot groups by semver, not by which packages share a private field — the same shape as the anyio / starlette pair in #112.

frontend/vitest.setup.ts already had a counter-based createObjectURL double, guarded by "only if nothing provides one". Vitest 5.0.1 provides one, so the guard handed the tests the broken implementation. The guard is gone; the comment records why the double is the right thing regardless (no test dereferences the URL — the 3D view's loader fails on it and settles as failed, as it did under vitest 4).

Verified, from npm ci on #110's lockfile (jsdom 30.1.0, vitest 5.0.1, react 19.3.0): ConfiguratorPage.test.tsx 24 failed before the change, 25 passed after; then tsc --build --force, lint, test (33 files, 317 passed) and build each exit=0. Re-verified on main's lockfile (jsdom 30.0.1, vitest 5.0.0): 317 passed. HANDOFF carries the record.

After this merges: @dependabot rebase on #110.

🤖 Generated with Claude Code

… a field jsdom 30.1 renamed

#110 (the frontend patch group), rebased onto the fixed main, still failed
`Tests`: 24 configurator cases with `TypeError: Cannot read properties of
undefined (reading '_buffer')` out of `URL.createObjectURL`. Vitest 5.0.1's
jsdom compatibility layer builds a Node Blob from jsdom's private `_buffer`;
jsdom 30.1 renamed it (vitest-dev/vitest#11336, fixed upstream by #11295,
unreleased). `vitest.setup.ts` already had a counter-based double, guarded by
"only if nothing provides one" - and vitest 5.0.1 provides one, so the guard
handed the tests the broken implementation.

The guard is gone. No test dereferences the URL: the 3D view's loader fails
on `blob:test/N` and settles as `failed`, exactly as under vitest 4 when the
double was all there was, and no test asserts a rendered mesh.

Verified from #110's lockfile (jsdom 30.1.0, vitest 5.0.1, react 19.3.0):
24 failed before, 25 passed after in ConfiguratorPage.test.tsx; then
`tsc --build --force`, `lint`, `test` (33 files, 317 passed) and `build`
each exit=0. Re-verified on main's lockfile (jsdom 30.0.1, vitest 5.0.0):
317 passed.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@dimmus
dimmus merged commit 34a24be into main Sep 24, 2026
7 checks passed
@dimmus
dimmus deleted the claude/vitest-blob-url-double branch September 24, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant