Repository navigation
test(hotkeys): Stop invariant tests from timing out on CI - #298
Conversation
The matching, layouts, and recorder-match invariants created a vi.fn() for each of thousands of registrations. Vitest holds every called mock and its call arguments until the test returns, so matching.test.ts peaked at 2.2 GB of heap in one worker and ran out of memory under a 384 MB cap. On a loaded Release runner the tests went past their timeouts. Count calls with a plain counter instead, and give the layouts recorded-chord sweep the same 30 s timeout as its neighbours.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
@tanstack/alpine-hotkeys
@tanstack/angular-hotkeys
@tanstack/angular-hotkeys-devtools
@tanstack/ember-hotkeys
@tanstack/hotkeys
@tanstack/hotkeys-devtools
@tanstack/lit-hotkeys
@tanstack/octane-hotkeys
@tanstack/preact-hotkeys
@tanstack/preact-hotkeys-devtools
@tanstack/react-hotkeys
@tanstack/react-hotkeys-devtools
@tanstack/solid-hotkeys
@tanstack/solid-hotkeys-devtools
@tanstack/svelte-hotkeys
@tanstack/svelte-hotkeys-devtools
@tanstack/vue-hotkeys
@tanstack/vue-hotkeys-devtools
commit: |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
🎯 Changes
The Release workflow on
mainfails in@tanstack/hotkeys:test:lib. Invariant tests time out (run); no assertion fails.matching,layouts, andrecorder-matchinvariants created avi.fn()for each of thousands of registrations. Vitest holds every called mock and its call arguments (the dispatched events) until the test returns.matching.test.tspeaked at 2.2 GB of heap in one worker, and with a 384 MB heap cap its worker crashes out of memory.matching, from 1.1 GB to 565 MB forlayouts, and from 380 MB to 164 MB forrecorder-match.matchingruns in 6.6 s instead of 11.4 s.recorded chordsweep gets the same explicit 30 s timeout as its neighbour. It takes about 0.2 s locally but went past the 5 s default on both failing Release runs..intent/review-state.jsonrecords the three test files as out of scope for skills.Notes
PR CI runs only the affected
test:lib, not the full uncachedtest:cithat Release runs, so the first Release run after merge is the real check.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit