Skip to content

test(http-query): use mockttp forQuery() - #1288

Merged
chimurai merged 1 commit into
masterfrom
mockttp-query
Aug 16, 2026
Merged

test(http-query): use mockttp forQuery()#1288
chimurai merged 1 commit into
masterfrom
mockttp-query

Conversation

@chimurai

@chimurai chimurai commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Tests
    • Improved end-to-end test coverage for QUERY requests, including proxying, encoding, request bodies, error handling, routing, origin changes, options, and header forwarding.
    • Tests now verify that QUERY-specific handlers and responses are matched accurately.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e6d843ae-b74a-4f3e-a1ff-5eb1bfdddb3d

📥 Commits

Reviewing files that changed from the base of the PR and between 39e1cff and 99dccbf.

📒 Files selected for processing (1)
  • test/e2e/http-query.spec.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

All QUERY end-to-end tests now use Mockttp’s forQuery() instead of forAnyRequest(). The tests cover proxying, responses, routing, path handling, origin changes, and header forwarding.

Changes

QUERY mock matching

Layer / File(s) Summary
QUERY-specific E2E handlers
test/e2e/http-query.spec.ts
Mockttp handlers in all QUERY scenarios now match only the QUERY method, including target requests, response statuses, routing, path handling, origin changes, and header forwarding.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 99dcc

This change is limited to updating an end-to-end test and introduces no actionable merge-blocking risk; it is merge-ready after normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the QUERY test changes and the switch to Mockttp's forQuery() configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mockttp-query

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.

@pkg-pr-new

pkg-pr-new Bot commented Aug 16, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/http-proxy-middleware@1288

commit: 99dccbf

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 95.227%. remained the same — mockttp-query into master

@chimurai
chimurai merged commit 087db31 into master Aug 16, 2026
26 checks passed
@chimurai
chimurai deleted the mockttp-query branch August 16, 2026 18:25
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