fix: restore CI after address refactor follow-ups#28
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR updates test consumption patterns for React hooks (useEditedComment, useAccountCommunities), refactors mock setup to use prototype-based method mocking, adds "subplebbitAddress" to non-editable properties in useEditedComment, and updates test infrastructure to use property descriptors for cleaner teardown. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Summary
subplebbitAddressexclusion inuseEditedCommentcommunitiesgetter safely and restore mocks reliablysubplebbitAddressfor compatibility with the current plebbit schemaVerification
yarn prettieryarn testyarn buildyarn vitest run --config config/vitest.config.js --coverage.enabled --coverage.provider=istanbul --coverage.reporter=text --coverage.reporter=json-summary --coverage.reportsDirectory=./coverage(passes)node scripts/verify-hooks-stores-coverage.mjs(fails on broader pre-existing repo coverage gaps outside this diff)yarn test:server(blocked locally: missingkubobinary in this environment)Note
Medium Risk
Small but behavior-affecting change in
useEditedComment’s edit-diffing plus updates to async/mocking patterns in tests; low production impact expected, but regressions would show up as incorrect edit-state UI.Overview
Restores
subplebbitAddressto the set of non-edit properties filtered out byuseEditedComment, preventing address-schema fields from being treated as user edits.Stabilizes several CI-flaky tests:
useEditedCommentnow waits for the base comment fetch before asserting edit state;useAccountCommunitiestests mockPlebbit.prototype.createCommunity(with properthisbinding) and assert propagatedstate/error/errors; and the communities-store retry test safely overrides theplebbit.communitiesgetter with reliable cleanup.Updates the test server to publish comments using
subplebbitAddressagain for current plebbit schema compatibility.Written by Cursor Bugbot for commit 68e0289. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
Bug Fixes
Chores