{"id":18287083,"url":"https://github.com/deno-libs/superfetch","last_synced_at":"2025-04-05T08:31:35.478Z","repository":{"id":51061487,"uuid":"370153436","full_name":"deno-libs/superfetch","owner":"deno-libs","description":"🐕 HTTP Server testing library inspired by node-supertest-fetch.","archived":false,"fork":false,"pushed_at":"2025-02-06T15:50:08.000Z","size":96,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T00:51:09.391Z","etag":null,"topics":["deno","http-testing","superagent","supertest","testing","unit-testing"],"latest_commit_sha":null,"homepage":"https://deno.land/x/superfetch","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deno-libs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"v1rtl","liberapay":"v1rtl"}},"created_at":"2021-05-23T20:42:56.000Z","updated_at":"2025-02-06T15:50:12.000Z","dependencies_parsed_at":"2024-01-04T12:49:27.247Z","dependency_job_id":null,"html_url":"https://github.com/deno-libs/superfetch","commit_stats":{"total_commits":34,"total_committers":3,"mean_commits":"11.333333333333334","dds":"0.11764705882352944","last_synced_commit":"03ca3225d71ff718928d477138ee2a7f5291ee9c"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deno-libs%2Fsuperfetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deno-libs%2Fsuperfetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deno-libs%2Fsuperfetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deno-libs%2Fsuperfetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deno-libs","download_url":"https://codeload.github.com/deno-libs/superfetch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247311637,"owners_count":20918336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","http-testing","superagent","supertest","testing","unit-testing"],"created_at":"2024-11-05T13:24:21.973Z","updated_at":"2025-04-05T08:31:35.413Z","avatar_url":"https://github.com/deno-libs.png","language":"TypeScript","readme":"# superfetch\n\n[![GitHub Workflow Status][gh-actions-img]][github-actions]\n[![Codecov][cov-badge]][cov] [![][docs-badge]][docs]\n\nHTTP Server testing library inspired by\n[node-supertest-fetch](https://github.com/jwalton/node-supertest-fetch).\n\n## Example\n\n### Basic testing\n\n```ts\nimport { describe, it } from 'jsr:@std/testing/bdd'\nimport { makeFetch } from 'jsr:@deno-libs/superfetch'\n\ndescribe('makeFetch', () =\u003e {\n  it('should work with HTTP handler', async () =\u003e {\n    const handler = (res) =\u003e new Response('Hello World')\n\n    const fetch = makeFetch(s)\n\n    const res = await fetch('/')\n    \n    res.expect('Hello World')\n  })\n\nrun()\n```\n\n### Full access to Response and port\n\n```ts\nimport { describe, it } from 'jsr:@std/testing/bdd'\nimport { makeFetch } from 'jsr:@deno-libs/superfetch'\n\ndescribe('makeFetch', () =\u003e {\n  it('should work with HTTP handler', async () =\u003e {\n    const handler = (res) =\u003e new Response('Hello World')\n\n    const fetch = makeFetch(s)\n\n    const res = await fetch('/')\n    \n    res.expect('Hello World')\n    console.log(res) // server response object\n    console.log(res.port) // port on which the server was listening\n  })\n\nrun()\n```\n\n[gh-actions-img]: https://img.shields.io/github/actions/workflow/status/deno-libs/superfetch/main.yml?branch=master\u0026style=for-the-badge\u0026logo=github\n[cov]: https://coveralls.io/github/deno-libs/superfetch\n[github-actions]: https://github.com/deno-libs/superfetch/actions\n[cov-badge]: https://img.shields.io/coverallsCoverage/github/deno-libs/superfetch?style=for-the-badge\n[docs-badge]: https://img.shields.io/github/v/release/deno-libs/superfetch?color=yellow\u0026label=Docs\u0026logo=deno\u0026style=for-the-badge\n[docs]: https://doc.deno.land/https/deno.land/x/superfetch/mod.ts\n","funding_links":["https://ko-fi.com/v1rtl","https://liberapay.com/v1rtl"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeno-libs%2Fsuperfetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeno-libs%2Fsuperfetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeno-libs%2Fsuperfetch/lists"}