You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(websocket): make the suite pass on Windows dev machines
Five classes of environment assumptions broke 23 tests on Windows; all
fixes keep the tests running unchanged on Linux CI.
- Symlink tests (file-api, local-file-access): creating symlinks on
Windows needs Developer Mode or elevation. A trySymlink helper skips
the test on EPERM instead of failing before the assertion runs.
- file:// URI expectations (resolve-media-urls): pathToFileURL prefixes
the current drive on Windows (file:///C:/var/...). Expectations are
now built with pathToFileURL, same as the source.
- path.join literals (trpc-mcp-config, trpc-fonts, trpc-workspace): the
routers join paths with the platform separator; tests compared against
hardcoded POSIX strings. Expectations now use join()/basename(). JSON
fixture keys stay POSIX — they come from the mocked homedir().
- Non-hermetic model routes (models-api-coverage, models-api-worker,
trpc-models-worker): GET /all reached the real secret store (live
provider calls on a machine with API keys) and scope=local scanned the
real HF cache (30s+ on a large one). Both layers are now mocked.
- Honest timeouts: trpc-packs live-loads the real minimax pack, which is
slow under vitest's transform on Windows (120s budget); the autosave
cutover waitForMessages ceiling goes 5s -> 30s — it returns as soon as
the expected count arrives, so fast machines pay nothing.
The "defaults the root to the home directory" test also had a false
premise on Windows: os.tmpdir() lives inside the home directory. It now
probes a path derived from the home drive's root, relying on the policy
check running before the existence check.
websocket suite on Windows: 23 failed -> 0 failed (5 skipped where the
OS forbids symlink creation).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments