Socket
Socket
Sign inDemoInstall

node-mocks-http

Package Overview
Dependencies
0
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.7 to 0.0.8

13

lib/mockRequest.js

@@ -40,2 +40,3 @@ /**

cookies: (options.cookies) ? options.cookies : {},
headers: (options.headers) ? options.headers: {},
body : (options.body ) ? options.body : {},

@@ -77,3 +78,3 @@ query : (options.query ) ? options.query : {},

*/
_setSessionVariable: function( variable, value ) {
_setCookiesVariable: function( variable, value ) {
this.cookies[variable] = value;

@@ -83,2 +84,12 @@ },

/**
* Sets a variable that is stored in the headers.
*
* @param variable The variable to store in the headers
* @param value The value associated with the variable
*/
_setHeadersVariable: function( variable, value ) {
this.headers[variable] = value;
},
/**
* Sets a variable that is stored in the files.

@@ -85,0 +96,0 @@ *

2

package.json

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

"description": "Mock 'http' objects for testing Express routing functions",
"version": "0.0.7",
"version": "0.0.8",
"homepage": "http://www.github.com/howardabrams/node-mocks-http",

@@ -8,0 +8,0 @@ "keywords": [

@@ -72,2 +72,8 @@ node-mocks-http

v 0.0.8
-------
* Add support for request headers
* Fix wrong function name of set cookies
v 0.0.7

@@ -74,0 +80,0 @@ -------

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc