cloudflare / miniflare

🔥 Fully-local simulator for Cloudflare Workers. For the latest version, see https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare.
https://miniflare.dev
MIT License
3.78k stars 205 forks source link

[Miniflare 3] Add back support for `fetchMock` #632

Closed mrbbot closed 1 year ago

mrbbot commented 1 year ago

This builds on top of #629, adding back support for undici MockAgents (https://undici.nodejs.org/#/docs/api/MockAgent) via the fetchMock option. This makes it easy to mock outbound fetch() requests in tests. This API is the same as Miniflare 2.

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 13b143017d6830cf8118af6cfb5cf94c183c1b37

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR