Socket
Socket
Sign inDemoInstall

node-mocks-http

Package Overview
Dependencies
0
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.4

20

lib/mockRequest.js

@@ -35,6 +35,8 @@ /**

return {
method: (options.method) ? options.method : 'GET',
url : (options.url ) ? options.url : '',
params: (options.params) ? options.params : {},
body : (options.body ) ? options.body : {},
method : (options.method) ? options.method : 'GET',
url : (options.url ) ? options.url : '',
params : (options.params) ? options.params : {},
session: (options.session) ? options.session : {},
body : (options.body ) ? options.body : {},
query : (options.query ) ? options.query : {},

@@ -58,2 +60,12 @@ /**

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

@@ -60,0 +72,0 @@ *

2

package.json

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

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

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

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