Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

test-listen

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-listen

Produce URLs to test HTTP servers with ephemeral ports

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created

What is test-listen?

The 'test-listen' npm package is a utility that helps in testing HTTP servers by providing a way to start a server and get its URL. This is particularly useful for integration tests where you need to make HTTP requests to a server.

What are test-listen's main functionalities?

Start a server and get its URL

This feature allows you to start an HTTP server and get its URL, which can then be used for making HTTP requests in your tests.

const testListen = require('test-listen');
const http = require('http');

const server = http.createServer((req, res) => {
  res.end('Hello World');
});

testListen(server).then(url => {
  console.log(`Server is running at ${url}`);
});

Other packages similar to test-listen

FAQs

Package last updated on 01 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc