Browse Source

print base64 encoded body if CRC does not match

jomo 9 năm trước cách đây
mục cha
commit
b0f50cbed0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      test/test.js

+ 1 - 1
test/test.js

@@ -799,7 +799,7 @@ describe("Crafatar", function() {
             try {
               assert.ok(matches);
             } catch(e) {
-              throw new Error(crc(body) + " != " + location.crc32);
+              throw new Error(crc(body) + " != " + location.crc32 + " | " + body.toString("base64"));
             }
             assert.strictEqual(res.headers.location, location.redirect);
             if (location.etag === undefined) {