Uh oh!
There was an error while loading. Please reload this page.
improvement(tests): db-mock migration tranche 2 — copilot, mothership, workspaces, connectors, mcp - #5863
Conversation
…, workspaces, connectors, mcp
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Tests now seed reads with In Reviewed by Cursor Bugbot for commit 3f189f5. Configure here. |
Greptile SummaryThis PR moves 26 test suites to the shared database mock infrastructure. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "fix(testing): drain unconsumed ...Once o..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
vi.clearAllMocks clears call history only — a ...Once override queued by a previous test but never consumed survived into the next test. resetDbChainMock now mockReset()s every shared spy and stable wrapper, which restores the original implementation AND drains once-queues.
waleedlatif1
commented
Jul 22, 2026
waleedlatif1
commented
Jul 22, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3f189f5. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Summary
vi.mock('@sim/db', <factory>)implementations onto the shareddbChainMock+queueTableRowsAPI — net ~−510 lines of bespoke chain plumbing (tranche 2 of the campaign; tranche 1 was improvement(tests): db-mock migration tranche 1 — knowledge, billing/org, workflows/background #5861, mock consolidation improvement(testing): consolidate @sim/db mocks into one table-aware chain mock #5856)app/api/copilot/**+lib/copilot/tools/handlers/**,app/api/mothership/**,app/api/workspaces/**,app/api/knowledge/[id]/connectors/**,app/api/mcp/**+lib/mcp/**schemaMock.copilotChatscolumns (pinned,deletedAt) matching the real schemaType of Change
Testing
Full apps/sim suite green locally (13704/13705; sole failure is the known local ripgrep dependency, green in CI). Every migrated file verified standalone, per-cluster in shared-worker runs, and with neighbor sweeps (copilot 1029 tests, knowledge/mcp 615, mothership/workspaces 119). tsc + biome clean.
Checklist