From 6e41423b7a7e13dfb9f977350fe69d9dcfebe71a Mon Sep 17 00:00:00 2001 From: jomo Date: Sun, 3 May 2015 22:46:03 +0200 Subject: [PATCH] set encoding: null in test HTTP requests from the 'request' docs: encoding: Encoding to be used on setEncoding of response data. If null, the body is returned as a Buffer. Anything else (including the default value of undefined) will be passed as the encoding parameter to toString() (meaning this is effectively utf8 by default). --- test/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index 9619261..3ad18cf 100644 --- a/test/test.js +++ b/test/test.js @@ -606,7 +606,7 @@ describe("Crafatar", function() { var location = locations[description]; (function(location) { it("should return correct HTTP response for " + description, function(done) { - request.get(location.url, {followRedirect: false}, function(error, res, body) { + request.get(location.url, {followRedirect: false, encoding: null}, function(error, res, body) { assert.ifError(error); assert_headers(res); assert(res.headers["x-storage-type"]);