fix(test): sync hooks-e2e expected counts after PR #28#29
Merged
Conversation
…+ TodoWrite-hint hooks PR #28 added: - 1 SessionStart hook (MR hint) - 1 PostToolUse hook (TodoWrite hint to call teamai-recall subagent) hooks.test.ts and other unit tests were updated in PR #28, but hooks-e2e.test.ts was missed, breaking CI on tencent/main. Update expected counts: - SessionStart: 2 -> 3 - PostToolUse: 6 -> 7 - title: "13 hooks" -> "15 hooks" Verified locally: - vitest e2e: hooks-e2e.test.ts 14/14 pass - vitest run: 1356 pass / 4 skip / 0 fail - tsc --noEmit: clean
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.
背景
PR #28 (
Phase 0+Phase 1+P4.4) 在src/hooks.ts中新增了 2 个 hook 注册:SessionStart(MR hint — 会话启动时提醒 AI 哪些 merged MR 还没导入)PostToolUse(TodoWrite hint — 提醒调用 teamai-recall subagent)PR #28 同步更新了
hooks.test.ts、usage-tracking.test.ts、doctor.test.ts,但漏改了hooks-e2e.test.ts,导致main分支 CI 中E2E (GitHub provider, full surface)job 失败:run 27407172848修复
仅改测试期望值,业务逻辑不动:
注:CI 报告里只看到 SessionStart 失败,是因为 vitest
expect在第一次断言失败时抛出,同it内后续的 PostToolUse 断言不再执行——属于隐藏的次生失败,本 PR 一并修掉。测试标题中的 "13 hooks" 也同步改为 "15 hooks"。
本地验证
npx vitest run --config vitest.e2e.config.ts src/__tests__/hooks-e2e.test.ts→ 14 passed (14)npx vitest run→ 1356 passed | 4 skipped | 0 failed (1360)npx tsc --noEmit→ cleanTest plan
E2E (GitHub provider, full surface)在该 PR 上转绿