{"id":17444339,"url":"https://github.com/jameskyburz/test-listen-destroy","last_synced_at":"2026-04-26T23:31:23.710Z","repository":{"id":52413390,"uuid":"93605537","full_name":"JamesKyburz/test-listen-destroy","owner":"JamesKyburz","description":"http server for tests with single assertion per call.","archived":false,"fork":false,"pushed_at":"2021-04-29T21:33:53.000Z","size":9,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T09:48:10.433Z","etag":null,"topics":["http","nodejs","test"],"latest_commit_sha":null,"homepage":"https://npm.im/test-listen-destroy","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JamesKyburz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-07T07:27:32.000Z","updated_at":"2020-05-15T13:12:21.000Z","dependencies_parsed_at":"2022-09-14T03:11:18.304Z","dependency_job_id":null,"html_url":"https://github.com/JamesKyburz/test-listen-destroy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesKyburz%2Ftest-listen-destroy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesKyburz%2Ftest-listen-destroy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesKyburz%2Ftest-listen-destroy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesKyburz%2Ftest-listen-destroy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamesKyburz","download_url":"https://codeload.github.com/JamesKyburz/test-listen-destroy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569131,"owners_count":20959758,"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":["http","nodejs","test"],"created_at":"2024-10-17T17:14:14.873Z","updated_at":"2026-04-26T23:31:23.680Z","avatar_url":"https://github.com/JamesKyburz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# test-listen-destroy\n\nUses [test-listen](https://npm.im/test-listen) but destroys http server when request is done.\n\nThis allows a single assertion per call.\n\n[![js-standard-style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/feross/standard)\n[![downloads](https://img.shields.io/npm/dm/test-listen-destroy.svg)](https://npmjs.org/package/test-listen-destroy)\n[![Greenkeeper badge](https://badges.greenkeeper.io/JamesKyburz/test-listen-destroy.svg)](https://greenkeeper.io/)\n\n# example\n\n```javascript\nconst listen = require('./')\nconst test = require('tape')\nconst request = require('request-promise')\n\ntest('server', async (t) =\u003e {\n  t.plan(1)\n  const fn = (req, res) =\u003e res.end('hello')\n  const url = await listen(fn)\n  const res = await request(url)\n  t.deepEqual(res, 'hello', 'server returns hello')\n})\n```\n\n# license\n\n[Apache License, Version 2.0](LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameskyburz%2Ftest-listen-destroy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjameskyburz%2Ftest-listen-destroy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameskyburz%2Ftest-listen-destroy/lists"}