Skip to content

test(platform): add tests for document agent tool helpers - #1103

Merged
yannickmonney merged 1 commit into
mainfrom
test/document-agent-tools
Apr 7, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
test/document-agent-tools

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Summary

  • Add 20 tests for fetchDocumentContent helper (happy paths, URL construction, truncation, error handling)
  • Add 16 tests for fetchDocumentComparison helper (response mapping, error cases, edge cases)
  • 36 tests total covering both document tool helpers

Fixes #661

Add comprehensive tests for fetchDocumentContent and
fetchDocumentComparison helpers covering happy paths, error handling,
URL construction, content truncation, response mapping, and timeouts.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@yannickmonney has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 41 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 41 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0efdcc75-1d9f-41fc-a25d-514d1e706772

📥 Commits

Reviewing files that changed from the base of the PR and between 24fe8a7 and 0e1bd8c.

📒 Files selected for processing (2)
  • services/platform/convex/agent_tools/documents/__tests__/fetch_document_comparison.test.ts
  • services/platform/convex/agent_tools/documents/__tests__/fetch_document_content.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/document-agent-tools

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@yannickmonney
yannickmonney merged commit cc3bbbf into main Apr 7, 2026
17 of 22 checks passed
@yannickmonney
yannickmonney deleted the test/document-agent-tools branch April 7, 2026 22:47
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.

test(platform): Add tests for document_list and document_retrieve tools

1 participant