mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:15:52 +01:00
[PR #13] [MERGED] tests: give the camera vm context the globals the viewer uses at load #72
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#72
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/13
Author: @wavehs
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:tests-viewer-vm-globals📝 Commits (1)
1ffabectests: give the camera vm context the globals the viewer uses at load📊 Changes
1 file changed (+5 additions, -0 deletions)
View changed files
📝
tests/test_viewer_streaming.cjs(+5 -0)📄 Description
Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository has no such issue yet. No open pull request touches
tests/test_viewer_streaming.cjs.Depends on: none.
What and why
viewer/index.htmlcallsloadWorld()at module scope; it creates anAbortControllerand arms asetTimeout. The Shift/Ctrl camera test runs the viewer in avmcontext whose sandbox does not provide either, so the context throws before the camera is returned:On Node 20 it then fails on
setTimeoutonceAbortControlleris added. This is why theviewer-testsjob fails on every pull request, including #5-#11, whose diffs do not touch the viewer:A
vmcontext has only what the sandbox gives it, on Node 24 as on Node 20, so the test now provides the two globals. The timers never fire: the manifest this context gets has no chunks to stream, and the test only steps one frame explicitly.Tested
macOS 15 arm64 (Apple M3 Pro), Node 20.20.2, no browser and no game data:
node --test tests/test_*.cjsmain@30daa6958Node 24 is what CI runs; the missing globals are the same there (the CI log above is Node 24). Not run: a browser, any GPU or game data.
AI-assisted: yes.
Checklist
docs/design.md, with how it was confirmed. (Not applicable: test-only.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.