Skip to content

Enhance test coverage for search tools and utilities - #1567

Merged
Dan Hellem (danhellem) merged 2 commits into
mainfrom
users/danhellem/update-tests-for-full-coverage-1
Aug 31, 2026
Merged

Dan Hellem (danhellem) merged 2 commits into
mainfrom
users/danhellem/update-tests-for-full-coverage-1

Conversation

@danhellem

@danhellem Dan Hellem (danhellem) commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

This pull request adds comprehensive tests for search tools and utility functions, improving coverage for various input scenarios, error handling, and request payloads. It also makes a minor code change to always provide a version descriptor in fetchCombinedResults.

Test coverage improvements:

  • Added tests for the code search tool to verify correct request payloads, schema handling, and robust error handling for malformed results, API failures, and unsuccessful fetches. [1] [2] [3]
  • Added tests for wiki and work item search tools to ensure proper filter payloads are sent and errors are reported when API calls fail. [1] [2]
  • Improved DomainsManager.parseDomainsInput test coverage to handle whitespace-only strings and empty arrays as input.
  • Enhanced utility function tests to verify getCliArgs uses process.argv by default and to check legacy URL handling in getOrgFromUrl. [1] [2]

Code logic update:

  • Changed fetchCombinedResults to always provide a versionDescriptor object, even when changeId is not present, ensuring consistent API calls.

GitHub issue number

N/A

Associated Risks

None

✅ PR Checklist

  • I have read the contribution guidelines
  • I have read the code of conduct guidelines
  • Title of the pull request is clear and informative.
  • 👌 Code hygiene
  • 🔭 Telemetry added, updated, or N/A
  • 📄 Documentation added, updated, or N/A
  • 🛡️ Automated tests added, or N/A

🧪 How did you test it?

Fixed and re-ran automated tests

@danhellem
Dan Hellem (danhellem) requested a review from a team as a code owner August 31, 2026 16:07
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@danhellem
Dan Hellem (danhellem) merged commit 016ec16 into main Aug 31, 2026
7 checks passed
@danhellem
Dan Hellem (danhellem) deleted the users/danhellem/update-tests-for-full-coverage-1 branch August 31, 2026 19:15
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.

2 participants