Skip to content

Tighten Cloudflare install test mock types#8067

Merged
alfonso-noriega merged 1 commit into
mainfrom
maintenance/cloudflare-test-types
Jul 13, 2026
Merged

Tighten Cloudflare install test mock types#8067
alfonso-noriega merged 1 commit into
mainfrom
maintenance/cloudflare-test-types

Conversation

@alfonso-noriega

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

No issue.

The Cloudflare installer tests mocked http.fetch with a partial response object cast to any. The production helper expects the node-fetch response shape, so the test can use a real Response instead of bypassing types.

WHAT is this pull request doing?

  • Replaces the hand-written partial fetch response with new Response(...) from node-fetch.
  • Removes the Readable stream import and the as any cast from the fetch mock.
  • Preserves the same mocked status/status text and response body content.

How to test your changes?

  • pnpm --filter @shopify/plugin-cloudflare vitest src/install-cloudflared.test.ts
  • pnpm --filter @shopify/plugin-cloudflare type-check
  • pnpm --filter @shopify/plugin-cloudflare lint
  • git diff --check

Post-release steps

None.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is not user-facing; no changeset is needed.

@alfonso-noriega alfonso-noriega requested a review from a team as a code owner July 13, 2026 09:56
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Jul 13, 2026
@alfonso-noriega alfonso-noriega added this pull request to the merge queue Jul 13, 2026
Merged via the queue into main with commit 847fbd8 Jul 13, 2026
29 of 30 checks passed
@alfonso-noriega alfonso-noriega deleted the maintenance/cloudflare-test-types branch July 13, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants