Skip to content

test_viewer_streaming: give the Shift/Ctrl freecam sandbox AbortController and timers - #5818

Closed
Joaovenera wants to merge 1 commit into
ItsNotRexed:mainfrom
Joaovenera:fix/viewer-test-abortcontroller
Closed

Joaovenera wants to merge 1 commit into
ItsNotRexed:mainfrom
Joaovenera:fix/viewer-test-abortcontroller

Conversation

@Joaovenera

Copy link
Copy Markdown

Claimed in the coordination issue as: #5781 (comment)

What and why

tests/test_viewer_streaming.cjs failed 1 of 57 on main (561b65a): "Shift speeds the camera up and Ctrl slows it down, on either side of the keyboard" threw ReferenceError: AbortController is not defined. loadWorld() in viewer/index.html (line 99) builds an AbortController, but this test's vm.runInNewContext sandbox did not pass it. The other two sandboxes in the file already pass AbortController and the timers. This adds AbortController, setTimeout, clearTimeout to the sandbox of this test.

Tested

node --test tests/test_viewer_streaming.cjs on Node 24.3.0, Windows 11: 56/57 before, 57/57 after. No GPU involved (the test uses a synthetic loader and clock).

AI-assisted: yes (Claude Code).

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable: no translator change.)

…oller and timers

viewer/index.html's loadWorld() builds an AbortController, but the vm sandbox of
the "Shift speeds the camera up and Ctrl slows it down" test did not pass it
(or setTimeout/clearTimeout), so the test failed with
"ReferenceError: AbortController is not defined". The other two sandboxes in the
file already pass them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Joaovenera

Copy link
Copy Markdown
Author

Closing as a duplicate of #5692 (same one-line change, opened earlier; TEST-1354). Tested #5692 instead, see my comment there.

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