Browse Source

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).
jomo 10 years ago
parent
commit
6e41423b7a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      test/test.js

+ 1 - 1
test/test.js

@@ -606,7 +606,7 @@ describe("Crafatar", function() {
       var location = locations[description];
       var location = locations[description];
       (function(location) {
       (function(location) {
         it("should return correct HTTP response for " + description, function(done) {
         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.ifError(error);
             assert_headers(res);
             assert_headers(res);
             assert(res.headers["x-storage-type"]);
             assert(res.headers["x-storage-type"]);