fix(tests): update three fixtures to the APIs and layouts they now target - #2453
fix(tests): update three fixtures to the APIs and layouts they now target#2453dcccrypto wants to merge 1 commit into
Conversation
…rget Third slice of the 65 CI failures #2450 exposed. Fixes 4, adds 2. Test files only, no product change. - priceStore-poll: the wsManager mock still exposed `onMessage` (global raw listener). priceStore subscribes via `onMessageForChannel(slab, listener)`, so `subscribeSlab` threw "manager.onMessageForChannel is not a function" and both live-tick tests died. Mock now keys listeners by channel, matching the real manager — a global list would deliver every tick to every slab, which the real dispatch never does. - v17-matcher-state: the fixture wrote the delegate at CTX_VAMM_OFFSET, but a 16-byte VAMM magic sits there and the delegate starts at +16. Corroborated by useCreateMarket.v17-matcher-{resume,recovery}.test.ts, which already use +16. The sibling "rejects another delegate" case was passing for the wrong reason: writing at +0 left the real delegate slot half-zeroed, so it mismatched by accident rather than by binding. Both now write at +16, and a new case pins the exact regression the reader's comment describes — an untouched delegate slot must read `uninitialized` no matter what the magic region holds. - gh1654: MarketInfoBar no longer imports MarketLogo directly. It moved into MarketSwitcher, which the bar renders with logoUrl/mintAddress/symbol — so the GH#1654 guarantee ("the info bar shows a market logo") is intact and the test, not the product, was stale. Rather than drop the guard, it now follows the composition: the bar passes the logo props to MarketSwitcher, and MarketSwitcher renders MarketLogo. 95 -> 91 failures, 28 -> 25 files. tsc --noEmit clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Closing as superseded — this landed upstream independently. The test-maintenance batch merged into Verified on the current base rather than assumed:
Rebasing it would produce a no-op at best, so closing rather than leaving a stale PR in the queue. For what it's worth the remaining 14 failures are covered by the three PRs I'm keeping open: #2451 (useWallet + ConnectButton, 7), #2459 (Header nav, 4), #2458 (Portfolio PORT-007, 1). With those three stacked the suite is 2823 passed, 0 failed. |
Third slice of the 65 failures #2450 exposed (after #2451 and #2452). Fixes 4, adds 2. Test files only — no product change.
priceStore-poll (2)
The wsManager mock exposed
onMessage(the global raw listener).priceStoresubscribes throughonMessageForChannel(slab, listener), sosubscribeSlabthrewmanager.onMessageForChannel is not a functionand both live-tick tests died before asserting anything.The mock now keys listeners by channel, matching the real manager. A global list would deliver every tick to every slab — something the real dispatch never does, so the old shape could have hidden cross-slab leakage.
v17-matcher-state (1 fixed, 1 added)
The fixture wrote the delegate at
CTX_VAMM_OFFSET, but a 16-byte VAMM magic sits there — the delegate starts at+16. Corroborated byuseCreateMarket.v17-matcher-{resume,recovery}.test.ts, which already use+16, so this file was the lone holdout.Worth calling out: the sibling "rejects a context bound to another delegate" was passing for the wrong reason. Writing 32 bytes at
+0left the real delegate slot half-zeroed, so it mismatched by accident rather than by binding — it would have passed against a broken reader too. Both cases now write at+16, and a new case pins the exact regression the reader's comment describes:gh1654 (1)
MarketInfoBarno longer importsMarketLogodirectly. I checked whether the logo had actually gone missing — it hasn't: it moved intoMarketSwitcher, which the bar renders withlogoUrl/mintAddress/mainnetCa/symbol. So the GH#1654 guarantee ("the info bar shows a market logo") is intact and the test was stale, not the product.Since this guards a real past regression, I followed the composition instead of dropping the assertion: the bar must pass the logo props to
MarketSwitcher, andMarketSwitchermust renderMarketLogo.Evidence
npx tsc --noEmitcleanStacks cleanly with #2451 and #2452 — disjoint files, all based on
playground.🤖 Generated with Claude Code