[Pkg-javascript-commits] [node-mocks-http] 129/296: fixed lint errors in mockResponse

Thorsten Alteholz alteholz at moszumanska.debian.org
Mon Feb 8 18:13:29 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 d0ecc51f08862a6cc32ed7c6f67e1d28e486342e
Author: Johnny Estilles <johnny.estilles at agentia.asia>
Date:   Sat Mar 21 00:35:59 2015 +0800

    fixed lint errors in mockResponse
---
 lib/mockResponse.js | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lib/mockResponse.js b/lib/mockResponse.js
index 899ff59..555c5c9 100644
--- a/lib/mockResponse.js
+++ b/lib/mockResponse.js
@@ -201,12 +201,12 @@ function createResponse(options) {
      */
 
     mockResponse.sendStatus = function sendStatus(statusCode) {
-      var body = http.STATUS_CODES[statusCode] || String(statusCode);
+        var body = http.STATUS_CODES[statusCode] || String(statusCode);
 
-      mockResponse.statusCode = statusCode;
-      mockResponse.type('txt');
+        mockResponse.statusCode = statusCode;
+        mockResponse.type('txt');
 
-      return mockResponse.send(body);
+        return mockResponse.send(body);
     };
 
 
@@ -260,7 +260,7 @@ function createResponse(options) {
      * @api public
      */
     mockResponse.contentType = mockResponse.type = function(type){
-      return mockResponse.set('Content-Type', type.indexOf('/') >= 0 ? type : mime.lookup(type));
+        return mockResponse.set('Content-Type', type.indexOf('/') >= 0 ? type : mime.lookup(type));
     };
 
     /**
@@ -334,8 +334,7 @@ function createResponse(options) {
         if (arguments.length === 2) {
             if (Array.isArray(val)) {
                 val = val.map(String);
-            }
-            else {
+            } else {
                 val = String(val);
             }
             mockResponse.setHeader(field, val);

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