[PR #93] tests: provide AbortController and timers in viewer camera speed test sandbox #146

Open
opened 2026-11-26 20:16:56 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/93
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: old-pr/9823


📝 Commits (1)

  • 3b7971d tests: provide AbortController and timers in viewer camera speed test sandbox

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 tests/test_viewer_streaming.cjs (+1 -0)

📄 Description

Carried over from old PR 9823 by lordon1a in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9823, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
lordon1a: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Claim: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116641828

What and why

Fixes a regression on main (2d53a8055) in tests/test_viewer_streaming.cjs where Shift speeds the camera up and Ctrl slows it down, on either side of the keyboard fails with ReferenceError: AbortController is not defined inside loadWorld().

loadWorld() creates an AbortController and timeout timers; the sibling VM sandbox at line 356 passes AbortController, setTimeout, clearTimeout, while the camera-speed sandbox at line 391 omitted them.

Verification (Windows 11 Home 26H2, Node.js v24.19.0, no game files)

  • Before fix (e56d97950 / 2d53a8055): node --test tests/test_viewer_streaming.cjs -> 56 passed, 1 failed (ReferenceError: AbortController is not defined).
  • After fix: node --test tests/test_viewer_streaming.cjs -> 57 passed, 0 failed.
  • python -I scripts/check_no_game_data.py tests/test_viewer_streaming.cjs: clean (rc=0).
  • git diff --check: clean (rc=0).

AI-assisted.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/93 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-pr/9823` --- ### 📝 Commits (1) - [`3b7971d`](https://github.com/ubiquitarianism/leonida/commit/3b7971d1cf1a6f4f5b52b71b64e53c830710b767) tests: provide AbortController and timers in viewer camera speed test sandbox ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_viewer_streaming.cjs` (+1 -0) </details> ### 📄 Description > Carried over from **old PR 9823** by `lordon1a` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9823`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `lordon1a`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Claim: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116641828 ### What and why Fixes a regression on `main` (`2d53a8055`) in `tests/test_viewer_streaming.cjs` where `Shift speeds the camera up and Ctrl slows it down, on either side of the keyboard` fails with `ReferenceError: AbortController is not defined` inside `loadWorld()`. `loadWorld()` creates an `AbortController` and timeout timers; the sibling VM sandbox at line 356 passes `AbortController, setTimeout, clearTimeout`, while the camera-speed sandbox at line 391 omitted them. ### Verification (Windows 11 Home 26H2, Node.js v24.19.0, no game files) - Before fix (`e56d97950` / `2d53a8055`): `node --test tests/test_viewer_streaming.cjs` -> **56 passed, 1 failed** (`ReferenceError: AbortController is not defined`). - After fix: `node --test tests/test_viewer_streaming.cjs` -> **57 passed, 0 failed**. - `python -I scripts/check_no_game_data.py tests/test_viewer_streaming.cjs`: clean (`rc=0`). - `git diff --check`: clean (`rc=0`). AI-assisted. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#146
No description provided.