Repository navigation
Conversation
Review: #7085, the camera-speed viewer test now gets the globals
|
| Check | Result |
|---|---|
git diff --check |
PASS |
python -m compileall -q make_game.py tools tests |
PASS |
python -I tools/check_no_game_data.py |
PASS |
python -I make_game.py --help |
PASS |
node --test tests/test_viewer_streaming.cjs (this PR) |
57 / 57 pass, 0 fail, ~813 ms |
| Same file from the parent commit | fails with ReferenceError: AbortController is not defined |
None of these needs game files or a GPU. The before and after runs reproduce the commit message's claim (56 passed and 1 failed before; 57 of 57 after).
Project rules
- No game data: the change is one line of test-harness JavaScript. It has no archives, shaders, textures, logs or carved content, and
check_no_game_data.pypasses. - No keys, decryption or protection workarounds: none touched.
- Nothing online: the test's
fetchis the localmanifestResponsestub, and no network or Rockstar/Xbox Live endpoints are involved. - Fix, don't disable: the failing test is repaired by giving it the environment it needs, not skipped or loosened, and its assertions are untouched.
AI-assisted.
|
Added the optional follow-up from the review in a second commit: the four sandboxes now spread one |
|
Independent check (Linux, Python 3.12.3, Node 24.13, CPU only, no game files): head
Fixes the red viewer test on main ( AI-assisted (Claude Code). |
Its vm sandbox was the only one without AbortController, setTimeout and clearTimeout, so the test failed on main with "ReferenceError: AbortController is not defined" at viewer/index.html's first `new AbortController()` in loadWorld. The other three sandboxes already pass them. node --test tests/test_viewer_streaming.cjs: 57 of 57 pass (56 and one failure before).
tikD1337's review of this PR noted that four sandboxes repeat the same browser globals by hand, so the next global loadWorld reads would break one of them silently, which is how this started. They now spread one browserGlobals object. The streaming fixture's fake timers and its performance clock still override the shared entries. node --test tests/test_viewer_streaming.cjs: 57 of 57 pass.
|
Rebased onto
Daazd noted #5692 and #7063 as the same change. This one is rebased, approved, and has both independent checks; whichever lands first wins. |
7c85e03 to
e9421da
Compare
|
Tested e9421da on Linux, Node 22.22.1: pass
|
Claimed in the coordination issue as a new item.
What and why
tests/test_viewer_streaming.cjsfails onmain(Node 24.21.0, Linux) at the camera-speed test:That test builds its own
vmsandbox and was the only one of the four that did not passAbortController,setTimeoutandclearTimeout. The viewer'sloadWorldcallsnew AbortController()and sets a timeout, so the sandbox needs both. The change adds the three globals to that sandbox.Tested
node --test tests/test_viewer_streaming.cjs(Node 24.21.0): 57 of 57 pass. Before the change: 56 pass, 1 fail.No game data, network or browser involved.
AI-assisted: yes