[Pkg-javascript-commits] [node-mocks-http] 80/296: removed check for statusCode === -1, no longer necessary

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 6950a45d5e770f0b8426b1695c432e2a2bc28269
Author: Johnny Estilles <johnny.estilles at agentia.asia>
Date:   Tue Mar 3 06:03:16 2015 +0800

    removed check for statusCode === -1, no longer necessary
---
 lib/mockResponse.js | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/mockResponse.js b/lib/mockResponse.js
index bc9416f..9141d6c 100644
--- a/lib/mockResponse.js
+++ b/lib/mockResponse.js
@@ -194,11 +194,6 @@ function createResponse(options) {
     mockResponse.json = function(a, b) {
 
         mockResponse.setHeader('Content-Type', 'application/json');
-        // Sets default status code if none has been specify.
-        if(mockResponse.statusCode === -1) {
-            mockResponse.statusCode = 200;
-        }
-
         if (a) {
             if (typeof a === 'number') {
                 mockResponse.statusCode = a;

-- 
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