Skip to main content
Module

x/mock_fetch/mod.ts>sandbox

An extremely simple way to mock globalThis.fetch responses
Latest
function sandbox
import { sandbox } from "https://deno.land/x/mock_fetch@0.3.0/mod.ts";

Get a set of functions that do not share any state with the globals.

The returned object can be destructured.

const { fetch, mock, remove, reset } = sandbox()