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

supertest-prefix

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

supertest-prefix - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "supertest-prefix",
"version": "1.0.1",
"version": "1.0.2",
"description": "An extension to supertest which adds prefix to the routes",

@@ -5,0 +5,0 @@ "license": "WTFPL",

@@ -14,6 +14,6 @@ [![Build Status](https://travis-ci.org/rodrigowirth/supertest-prefix.svg?branch=master)](https://travis-ci.org/rodrigowirth/supertest-prefix)

// Uses the proxy
// Uses the prefix
await request
.get('/cars') // Becomes /api/cars
.use(proxy)
.use(prefix)
.expect(200);

@@ -23,3 +23,3 @@

.get('http://localhost:3000/cars') // Becomes http://localhost:3000/api/cars
.use(proxy)
.use(prefix)
.expect(200);

@@ -43,3 +43,3 @@ ```

request
.use(proxy);
.use(prefix);

@@ -46,0 +46,0 @@ // Use supertest like you always have; the prefix will be applied to each request automatically

Sorry, the diff of this file is not supported yet

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