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

supertest-fetch

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

supertest-fetch - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

7

lib/index.js

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var http_1 = __importDefault(require("http"));
var Server_1 = __importDefault(require("./Server"));

@@ -48,3 +49,7 @@ var Test_1 = __importDefault(require("./Test"));

*/
function makeFetch(server) {
function makeFetch(target) {
// if we were given an express app
var server = target && target.route
? http_1.default.createServer(target)
: target;
if (!server || !server.listen || !server.address || !server.close) {

@@ -51,0 +56,0 @@ throw new Error("Expected server");

10

package.json
{
"name": "supertest-fetch",
"version": "1.0.5",
"version": "1.1.0",
"description": "Supertest with WHATWG fetch like interface.",

@@ -59,2 +59,3 @@ "main": "lib/index.js",

"@types/chai-as-promised": "^7.1.0",
"@types/express": "^4.16.0",
"@types/mocha": "^5.2.0",

@@ -65,9 +66,10 @@ "@types/node": "^10.0.0",

"coveralls": "^3.0.0",
"express": "^4.16.3",
"husky": "^1.0.0-rc.2",
"lint-staged": "^7.0.5",
"markdownlint-cli": "^0.9.0",
"markdownlint-cli": "^0.12.0",
"mocha": "^5.1.1",
"nyc": "^11.8.0",
"nyc": "^12.0.1",
"semantic-release": "^15.2.0",
"ts-node": "^6.0.1",
"ts-node": "^7.0.0",
"tslint": "^5.9.1",

@@ -74,0 +76,0 @@ "typescript": "^2.8.3",

/// <reference types="node" />
/// <reference types="express" />
import http from 'http';
import { Express } from 'express';
import * as nodeFetch from 'node-fetch';

@@ -29,3 +31,3 @@ import Test from './Test';

*/
export declare function makeFetch(server: http.Server): (url: string | nodeFetch.Request, init?: nodeFetch.RequestInit | undefined) => Test;
export declare function makeFetch(target: http.Server | Express): (url: string | nodeFetch.Request, init?: nodeFetch.RequestInit | undefined) => Test;
export { fetch };

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