test(agent-service): extend workflow-crud-tools and add a logger spec - #7026
Open
aglinxinyuan wants to merge 1 commit into
Open
test(agent-service): extend workflow-crud-tools and add a logger spec#7026aglinxinyuan wants to merge 1 commit into
aglinxinyuan wants to merge 1 commit into
Conversation
Add 18 tests (no source changes): the modifyOperator validation-pass path and the input-port index guards (non-numeric, negative, out-of-range) in workflow-crud-tools, plus a new spec for logger.ts covering its level and formatting branches with any stubbed global state restored.
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7026 +/- ##
============================================
+ Coverage 79.20% 79.25% +0.04%
Complexity 3786 3786
============================================
Files 1160 1160
Lines 46118 46118
Branches 5114 5114
============================================
+ Hits 36529 36549 +20
+ Misses 7969 7949 -20
Partials 1620 1620
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What changes were proposed in this PR?
Adds 18 tests (17 -> 35). No source changes.
workflow-crud-tools.ts(~94% covered): themodifyOperatorpath where properties pass metadata validation (only the failing path was covered before), plus the input-port index guards — non-numeric key, negative index, and out-of-range index — each asserting the specific error message.logger.ts(~57% covered, no test before): a new spec covering its level and formatting branches deterministically, with any stubbed global state restored.Note:
src/agent/prompts.tswas deliberately left alone — another open PR is already addingprompts.test.ts.Any related issues, documentation, discussions?
Closes #7024.
How was this PR tested?
bun test src/agent/tools/workflow-crud-tools.spec.ts src/logger.spec.ts-> 35 pass, 0 fail (104 expect() calls).bunx prettier --check "src/**/*.{ts,js,json}"clean.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8 [1M context])