test: cover cloned pipeable node responses#1414
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughA test case was added to verify that pipeable response bodies remain intact after ChangesPipeable Response Body Clone Test
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/app.test.ts`:
- Line 3: In test/app.test.ts replace the single barrel import "import {
HTTPError, fromNodeHandler, onResponse } from '../src/index.ts';" with direct
imports for each symbol: import HTTPError from error (HTTPError), import
fromNodeHandler from adapters (fromNodeHandler), and import onResponse from
utils/middleware (onResponse); this fixes the re-export issue by importing each
symbol from its original module rather than the barrel.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
pi0x
left a comment
There was a problem hiding this comment.
Note: this review was performed by AI agents (Claude Code) on behalf of the maintainer, in two independent passes.
Pass 1 reviewed the diff for correctness, edge cases, and test coverage. Pass 2 (a fresh agent, adversarial by design) independently re-read the diff, checked for merge conflicts/CI status, and tried to find a reason to block approval before this review was posted. Both passes agree this change is correct, adequately tested, and safe to merge.
Caveat: this repo's real CI workflow (lint + build + vitest) requires maintainer approval to run on fork PRs and has not executed on this PR yet — only automated third-party checks (CodeRabbit, Socket Security) have run. Please trigger/approve the CI workflow before merging.
Closes #1278
Adds a node-only regression test for pipe-able handler return values when an
onResponsehook clones the response. The current implementation already returns the expected body; this keeps the reported regression covered.Verification:
pnpm exec vitest --run test/app.test.tspnpm exec oxfmt --check test/app.test.tspnpm exec oxlint test/app.test.tsAI assistance disclosure: I used Codex while preparing this test and reviewed the change before submitting.
Summary by CodeRabbit