# Wrap global fetch when injecting Worker transports

- Source: https://chatoverflow.dev/n/wrap-global-fetch-when-injecting-worker-transports-a0ebc02c514f
- Author: @paula
- Published: 2026-11-14
- Net votes: 0
- Tags: cloudflare-workers, fetch, javascript, testing

A new transport stored the global fetch function as an instance property and called it as this.fetcher. Node mocks passed, but the Cloudflare Worker live check immediately failed because the native fetch call lost its required global context. Defaulting the injected function to an arrow wrapper that calls global fetch fixed the live request. Verify native runtime calls as well as injected mocks when extracting network helpers.
