Conversation
覆盖 buildTool、toolMatchesName、findToolByName、getEmptyToolPermissionContext、 filterToolProgressMessages、parseToolPreset、parseGitCommitId、detectGitOperation 共 46 个测试用例全部通过。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
覆盖 xml, hash, stringUtils, semver, uuid, format, frontmatterParser, file, glob, diff 共 10 个模块的纯函数测试。 json.ts 因模块加载链路过重暂跳过。 共 190 个测试用例(含已有 array/set)全部通过。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
覆盖 stripHtmlComments、isMemoryFilePath、getLargeMemoryFiles、 buildEffectiveSystemPrompt 等函数,共 25 个测试用例全部通过。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
覆盖 escapeRuleContent、unescapeRuleContent、permissionRuleValueFromString、 permissionRuleValueToString、normalizeLegacyToolName,共 25 个测试用例。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
覆盖 isModelAlias、isModelFamilyAlias、getAPIProvider、 isFirstPartyAnthropicBaseUrl、firstPartyNameToCanonical,共 40 个测试用例。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
覆盖 parseCronExpression、computeNextCronRun、cronToHuman, 包含有效/无效表达式、字段范围验证、下次运行计算、人类可读描述, 共 38 个测试用例。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
为 normalizeGitRemoteUrl 添加 18 个测试用例,覆盖 SSH、HTTPS、 ssh://、CCR 代理 URL 格式、大小写规范化及边界条件。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
为 SettingsSchema、PermissionsSchema、AllowedMcpServerEntrySchema 验证,MCP 类型守卫,设置常量函数,以及 validation 工具函数添加 62 个测试用例。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
为消息创建、查询、文本提取、规范化等函数添加 56 个测试用例, 覆盖 createAssistantMessage、createUserMessage、isSyntheticMessage、 extractTag、isNotEmptyMessage、normalizeMessages 等核心功能。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
在 testing-spec.md 新增第 11 节,按 P0/P1/P2 分类记录 25 个 测试文件的覆盖范围、测试数量及已知的重依赖限制。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- json.test.ts: 27 tests (safeParseJSON, safeParseJSONC, parseJSONL, addItemToJSONCArray) - truncate.test.ts: 24 tests (truncateToWidth, truncateStartToWidth, truncatePathMiddle, truncate, wrapText) - path.test.ts: 15 tests (containsPathTraversal, normalizePathForConfigKey) - tokens.test.ts: 22 tests (getTokenCountFromUsage, getTokenUsage, tokenCountFromLastAPIResponse, etc.) 使用 mock.module() 切断 log.ts/tokenEstimation.ts/slowOperations.ts 重依赖链 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- FileEditTool/utils.test.ts: 24 tests (normalizeQuotes, stripTrailingWhitespace, findActualString, preserveQuoteStyle, applyEditToFile) - permissions/permissions.test.ts: 13 tests (getDenyRuleForTool, getAskRuleForTool, getDenyRuleForAgent, filterDeniedAgents) - tools.test.ts: 扩展 5 tests (filterToolsByDenyRules 过滤逻辑) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 新增 json/truncate/path/tokens/FileEditTool/permissions 测试记录 - 更新已知限制(Bun.JSONL bug, spawnMultiAgent 重依赖) - 添加 Mock 策略总结章节 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe PR introduces comprehensive test planning documentation and implementing test suites across the codebase. It adds nine test-plan documents specifying coverage requirements for tool systems, utilities, context building, permissions, model routing, message handling, cron operations, git utilities, and configuration. Additionally, a testing specification is included alongside numerous test files implementing coverage for the specified modules using Bun's testing framework. The README is also updated with sponsorship information and V5 roadmap details. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~28 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary by CodeRabbit
Documentation
Tests