test(shared): edgeEventMappers + queryKeys + upload 补 194 个单元测试(Lane D #1764 第五批) - #1772
test(shared): edgeEventMappers + queryKeys + upload 补 194 个单元测试(Lane D #1764 第五批)#1772DeliciousBuding wants to merge 2 commits into
Conversation
…#1764 第五批) - transcript/edgeEventMappersAgents.ts:+40(subagent/subtask/childAgent/route/contextUsage/agentResult/compactBoundary 全分支) - transcript/edgeEventMappersRun.ts:+44(runText/status/failed/cancelled/finished/outputText/outputBatch/agentText/thinking) - stores/queryKeys.ts:+87(hub/edge 全部 key factory + isQueryKeyPrefix/rootPrefix 边界) - composer/upload.ts:+23(XHR/fetch 双路径、真实 SHA-256、进度映射,100% 分支覆盖) 不改任何产品代码。Lane D #1764 Co-authored-by: Cursor <cursor@vectorcontrol.tech>
|
Warning Review limit reached
Next review available in: 47 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
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 |
… setup beforeEach 里 vi.mocked(fetch).mockReset() 在 desktop 测试环境(fetch 为真实实现、 非 shared setup 注入的 vi.fn())抛 TypeError。fetch 回退用例本就各自 stubGlobal 显式 安装 mock,故此 reset 多余且有害,直接移除。Lane D #1764 Co-authored-by: Cursor <cursor@vectorcontrol.tech>
Summary
延续 #1765–#1767,落地 Lane D 前端测试补债 (#1764) 第五批:给 4 个纯逻辑模块补 194 个单元测试。不改任何产品代码。
为什么选它
transcript/edgeEventMappers*.ts(424 行):Edge 事件 → TranscriptBlock 映射,WS 帧字段缺失/回退链的回归风险点。stores/queryKeys.ts(188 行):TanStack Query key 工厂,空串/undefined/null 分支易错。composer/upload.ts(217 行):XHR/fetch 双路径上传 + 真实 SHA-256 + 进度映射,100% 分支覆盖。覆盖范围
Test plan
vitest run新文件 — 194/194 通过tsc --noEmit全包 0 错误关联