Repository navigation
test(summary): 补全 bot-registry mock 的 effectiveBotDisplayName 导出 - #1835
Merged
Merged
Conversation
#1821 后 summary-command 的导入链经 message-parser 引入 effectiveBotDisplayName;本测试的部分 vi.mock 缺该导出。 vitest 容忍缺失,Bun 整模块替换在 import 期直接 SyntaxError, 致 bun-test 全量腿唯一红。补一行 stub(getAllBots 返回 [], 该函数实际不会被调用)。纯测试改动。 Co-Authored-By: Claude Code <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 12, 2026 12:55
This was referenced Oct 12, 2026
|
🚀 Released in v3.42.0 |
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
master 基线红:
bun-test全量腿唯一失败文件test/summary-command-window.test.ts(1441/1442 绿)。根因
#1821(解析
<at>提及标签为展示名)后,summary-command的导入链经im/lark/message-parser.ts引入了effectiveBotDisplayName。该测试用vi.mock('../src/bot-registry.js', ...)做了部分 mock,导出表里没有这个新名字。bun test单文件红已在纯
origin/master(892ff9dee)独立 worktree 用 bun 复现同一 SyntaxError,与 PR 无关,是 master 自身基线红。修法
按该文件里既有的
getMessageDetail同款处理(mock 注释明确写了 Bun 整模块替换的坑),补一行effectiveBotDisplayNamestub。mock 的getAllBots()返回[],该函数实际不会被调用,纯满足导入图,不改任何被测行为。验证
bun test test/summary-command-window.test.ts:6 pass / 0 fail(修复前 0 pass / 1 error)vitest run同文件:6 passed🤖 Generated with Claude Code