supertest-fetch
Advanced tools
Comparing version 1.4.1 to 1.4.2
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -41,2 +42,3 @@ }); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.HeaderAssertion = exports.BodyAssertion = exports.StatusAssertion = void 0; | ||
var assert_1 = __importDefault(require("assert")); | ||
@@ -251,3 +253,3 @@ var MAX_SHORT_BODY_LENGTH = 80; | ||
} | ||
else if (this._value.exec) { | ||
else if (typeof this._value === 'object' && 'exec' in this._value) { | ||
var regex = this._value; | ||
@@ -254,0 +256,0 @@ var headerValue = response.headers.get(this._name); |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.makeFetch = exports.fetch = exports.Test = void 0; | ||
var http_1 = require("http"); | ||
@@ -12,6 +13,6 @@ var Server_1 = __importDefault(require("./Server")); | ||
var node_fetch_1 = require("node-fetch"); | ||
exports.Body = node_fetch_1.Body; | ||
exports.Headers = node_fetch_1.Headers; | ||
exports.Request = node_fetch_1.Request; | ||
exports.Response = node_fetch_1.Response; | ||
Object.defineProperty(exports, "Body", { enumerable: true, get: function () { return node_fetch_1.Body; } }); | ||
Object.defineProperty(exports, "Headers", { enumerable: true, get: function () { return node_fetch_1.Headers; } }); | ||
Object.defineProperty(exports, "Request", { enumerable: true, get: function () { return node_fetch_1.Request; } }); | ||
Object.defineProperty(exports, "Response", { enumerable: true, get: function () { return node_fetch_1.Response; } }); | ||
/** | ||
@@ -18,0 +19,0 @@ * Fetch a resource from a server, returns a Test. |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -40,9 +60,2 @@ }); | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -49,0 +62,0 @@ var assert_1 = __importDefault(require("assert")); |
{ | ||
"name": "supertest-fetch", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Supertest with WHATWG fetch like interface.", | ||
@@ -58,4 +58,4 @@ "main": "lib/index.js", | ||
"@types/chai-as-promised": "^7.1.0", | ||
"@types/mocha": "^5.2.6", | ||
"@types/node": "^12.0.0", | ||
"@types/mocha": "^8.0.0", | ||
"@types/node": "^14.0.6", | ||
"chai": "^4.2.0", | ||
@@ -65,11 +65,11 @@ "chai-as-promised": "^7.1.1", | ||
"express": "^4.16.4", | ||
"husky": "^2.4.0", | ||
"lint-staged": "^8.1.4", | ||
"mocha": "^6.1.4", | ||
"nyc": "^14.0.0", | ||
"prettier": "^1.16.4", | ||
"pretty-quick": "^1.10.0", | ||
"semantic-release": "^15.13.12", | ||
"husky": "^4.0.0", | ||
"lint-staged": "^10.0.0", | ||
"mocha": "^8.1.1", | ||
"nyc": "^15.0.0", | ||
"prettier": "^2.0.1", | ||
"pretty-quick": "^2.0.0", | ||
"semantic-release": "^17.0.0", | ||
"ts-node": "^8.0.3", | ||
"tslint": "^5.12.1", | ||
"tslint": "^6.0.0", | ||
"typescript": "^3.4.1", | ||
@@ -76,0 +76,0 @@ "validate-commit-msg": "^2.14.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
52661
746