node-mocks-http
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -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 @@ * |
@@ -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 @@ ------- |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
27052
658
115
0