@li/http-saver@0.5.1Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
lionel-rowe/http-saverWorks with
•JSR Score100%•This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers



Downloads10/wk
•Published6 months ago (0.5.1)
Save API responses for testing.
HTTP Saver 
Save API responses for testing.
Usage
const httpSaver = new HttpSaver() Deno.test('some API', () => { using _ = httpSaver.stubFetch() // First time the test runs, the response will be saved under `_fixtures/responses` // Subsequent test runs will use the saved response, without making a network request const res = await fetch('https://api.example.com') // ... do something with `res` })
Built and signed on
GitHub Actions
Add Package
deno add jsr:@li/http-saver
Import symbol
import * as http_saver from "@li/http-saver";
Import directly with a jsr specifier
import * as http_saver from "jsr:@li/http-saver";
Add Package
pnpm i jsr:@li/http-saver
pnpm dlx jsr add @li/http-saver
Import symbol
import * as http_saver from "@li/http-saver";
Add Package
yarn add jsr:@li/http-saver
yarn dlx jsr add @li/http-saver
Import symbol
import * as http_saver from "@li/http-saver";
Add Package
vlt install jsr:@li/http-saver
Import symbol
import * as http_saver from "@li/http-saver";
Add Package
npx jsr add @li/http-saver
Import symbol
import * as http_saver from "@li/http-saver";
Add Package
bunx jsr add @li/http-saver
Import symbol
import * as http_saver from "@li/http-saver";