Skip to content

test(shared): hubClientTransportRun/Catch + testing/i18n 补 116 个单元测试(Lane D #1764 第九批) - #1778

Merged
DeliciousBuding merged 1 commit into
masterfrom
test/shared-transportrun-catch-testing-i18n-unit-tests
Aug 19, 2026
Merged

test(shared): hubClientTransportRun/Catch + testing/i18n 补 116 个单元测试(Lane D #1764 第九批)#1778
DeliciousBuding merged 1 commit into
masterfrom
test/shared-transportrun-catch-testing-i18n-unit-tests

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

Summary

延续 #1765#1777,落地 Lane D 前端测试补债 (#1764) 第九批:给 3 个模块补 116 个单元测试。不改任何产品代码。

为什么选它

  • hubClientTransportRun.ts(413 行):run 传输流编排(refresh-recovery 门控、TIMEOUT/NETWORK 重映射、route-fallback)——全部经注入 fetchImpl 测试,100% 行/分支/函数覆盖。
  • hubClientTransportCatch.ts(423 行):catch 分类/决策/效果编排 + abort 超时计时器生命周期。
  • testing/i18n.ts(171 行):测试专用 i18n 工具(createTestI18n/installTestI18n),此前零覆盖。

覆盖范围

  • transportRun(+47):fetchHubJson/Multipart、runHub* 系列、createHubClientTransport、refresh 恢复门控(非 401/缺 handler/空 token/refresh 抛错/重试抛错)、route-fallback(404/405 继续、500/网络重抛、耗尽重抛)、30s 默认超时
  • transportCatch(+34):19 导出全量、abort 计时器清理(成功/失败均清)、classify/resolve/plan 4 分支、exactOptional 包装、空串 token 中止重试
  • testing/i18n(+35):默认值/语言选择/资源合并/回退 false/实例隔离/useTestI18nLanguage/重复 install

Test plan

  • vitest run 新文件 — 116/116 通过
  • tsc --noEmit 全包 0 错误
  • CI 前端测试 job 通过

关联

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DeliciousBuding, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 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?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 37d974a3-5060-4e72-b10f-903d7a970f18

📥 Commits

Reviewing files that changed from the base of the PR and between 86e1ddd and 96e86b3.

📒 Files selected for processing (3)
  • app/shared/src/hub/hubClientTransportCatch.test.ts
  • app/shared/src/hub/hubClientTransportRun.test.ts
  • app/shared/src/testing/i18n.test.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…Lane D #1764 第九批)

- hubClientTransportRun.ts:+47(注入 fetchImpl 全路径,100% 行/分支/函数覆盖;refresh-recovery 门控、TIMEOUT/NETWORK 重映射、route-fallback 语义)
- hubClientTransportCatch.ts:+34(19 个导出全量:abort 超时计时器清理、catch 分类/决策/效果 4 分支、exactOptional 包装)
- testing/i18n.ts:+35(createTestI18n/installTestI18n/useTestI18nLanguage:默认值/语言选择/资源合并/回退/隔离)

不改任何产品代码。Lane D #1764

Co-authored-by: Cursor <cursor@vectorcontrol.tech>
@DeliciousBuding
DeliciousBuding force-pushed the test/shared-transportrun-catch-testing-i18n-unit-tests branch from 09c67c5 to 96e86b3 Compare August 19, 2026 19:17
@DeliciousBuding
DeliciousBuding merged commit 6627225 into master Aug 19, 2026
34 checks passed
@DeliciousBuding
DeliciousBuding deleted the test/shared-transportrun-catch-testing-i18n-unit-tests branch August 19, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant