Skip to content

test: restore docs proxy type-check - #43

Merged
mblode merged 1 commit into
mainfrom
fix/docs-proxy-typecheck
Aug 14, 2026
Merged

test: restore docs proxy type-check#43
mblode merged 1 commit into
mainfrom
fix/docs-proxy-typecheck

Conversation

@mblode

@mblode mblode commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • type the docs proxy fetch spy as the platform fetch function
  • preserve the RequestInit tuple type when asserting forwarded router headers
  • add the repository-required empty Changeset

Why

TypeScript 7 inferred the zero-argument mock as [], so reading the second recorded call argument failed type-check even though the test passes at runtime.

Validation

  • npm run check-types
  • npm run test (82 passed, 1 skipped)
  • npm run lint
  • npm run build
  • npx changeset status --since origin/main
  • git diff --check

Note

Low Risk
Test-only typing fix and an empty changeset; no runtime or production behavior changes.

Overview
Fixes TypeScript 7 type-check failures in the docs proxy test that asserts Next.js router headers are forwarded to upstream fetch.

The fetch spy is now typed as vi.fn<typeof fetch>(...) so mock.calls[0][1] is treated as RequestInit and accessing headers type-checks. Adds the required empty Changeset file.

Reviewed by Cursor Bugbot for commit 5457c42. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
diffhub-web Ready Ready Preview Aug 14, 2026 9:50pm

Request Review

@mblode
mblode marked this pull request as ready for review August 14, 2026 22:15
@mblode
mblode merged commit f713c0a into main Aug 14, 2026
4 checks passed
@cursor

cursor Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_bafd7a25-fe75-403b-bbc6-9cebc46a1c37)

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.

1 participant