supertest-prefix
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4864
8