You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

node-mocks-http

Package Overview
Dependencies
Maintainers
4
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-mocks-http - npm Package Compare versions

Comparing version

to
1.6.2

lib/index.d.ts

18

lib/express/mock-express.js

@@ -11,2 +11,16 @@ 'use strict';

function createExpressResponse(options) {
var res = response.createResponse(options);
// http://expressjs.com/en/api.html#res.locals
res.locals = options && options.locals || {};
return res;
}
var expressResponse = {
createResponse: createExpressResponse
};
function createApplication() {

@@ -23,3 +37,3 @@ var app = function() {};

app.response = {
__proto__: response.createResponse(),
__proto__: expressResponse.createResponse(),
app: app

@@ -35,2 +49,2 @@ };

exports.request = request;
exports.response = response;
exports.response = expressResponse;

4

package.json

@@ -5,3 +5,3 @@ {

"description": "Mock 'http' objects for testing Express routing functions",
"version": "1.6.1",
"version": "1.6.2",
"homepage": "https://github.com/howardabrams/node-mocks-http",

@@ -40,2 +40,3 @@ "bugs": {

"main": "./lib/http-mock.js",
"types": "./lib/index.d.ts",
"engines": {

@@ -45,2 +46,3 @@ "node": ">=0.6"

"dependencies": {
"@types/express": "^4.0.35",
"accepts": "^1.3.3",

@@ -47,0 +49,0 @@ "depd": "^1.1.0",