[Pkg-javascript-commits] [node-mocks-http] 85/296: Release 1.2.5 of the project

Thorsten Alteholz alteholz at moszumanska.debian.org
Mon Feb 8 18:13:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository node-mocks-http.

commit f8f1cef785a6cf606ea5bec448368ea63bf77494
Author: Howard Abrams <howard.abrams at gmail.com>
Date:   Wed Mar 4 20:39:10 2015 -0800

    Release 1.2.5 of the project
    
    This incorporates may bug fixes and features submitted by many folks.
    I really appreciate the support, and I promise from now on, I will
    incorporate the fixes quicker in order to keep a better Git history.
---
 README.md           | 7 +++++++
 lib/mockResponse.js | 8 ++++++--
 package.json        | 2 +-
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 05e5908..aa71cc2 100644
--- a/README.md
+++ b/README.md
@@ -117,6 +117,13 @@ Most releases fix bugs with our mocks or add features similar to the
 actual `Request` and `Response` objects offered by Node.js and extended
 by Express.
 
+* v 1.2.5
+
+  * Add `path` to request similar to how express does `req.path`
+  * Emit send and end events for json response too
+  * res.set() works like Express when passed an object #33
+  * Set mockResponse.statusCode default to 200, instead of -1
+
 
 License
 ---
diff --git a/lib/mockResponse.js b/lib/mockResponse.js
index c462562..6f4f915 100644
--- a/lib/mockResponse.js
+++ b/lib/mockResponse.js
@@ -279,8 +279,12 @@ function createResponse(options) {
     */
     mockResponse.set = mockResponse.header = function header(field, val) {
         if (arguments.length === 2) {
-            if (Array.isArray(val)) val = val.map(String);
-            else val = String(val);
+            if (Array.isArray(val)) {
+                val = val.map(String);
+            }
+            else {
+                val = String(val);
+            }
             mockResponse.setHeader(field, val);
         } else {
             for (var key in field) {
diff --git a/package.json b/package.json
index 3567356..f63b514 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "author": "Howard Abrams <howard.abrams at gmail.com> (http://www.github.com/howardabrams)",
   "name": "node-mocks-http",
   "description": "Mock 'http' objects for testing Express routing functions",
-  "version": "1.2.4",
+  "version": "1.2.5",
   "homepage": "http://www.github.com/howardabrams/node-mocks-http",
   "license" : "MIT",
   "keywords": [

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-mocks-http.git



More information about the Pkg-javascript-commits mailing list