X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fsrc%2Fcommon.js;h=33351479b38c9826466cea086a9103e3e91dc452;hb=7dd0b6c2ef1abfbec7e88c928a1735deb5c28c04;hp=a24db1f2b761605c9e0a7adc56008f2f71d319eb;hpb=07bf59d8ac7f5fc6d5ac5e6b92a37afdbb896790;p=squeep-indie-auther diff --git a/test/src/common.js b/test/src/common.js index a24db1f..3335147 100644 --- a/test/src/common.js +++ b/test/src/common.js @@ -1,4 +1,3 @@ -/* eslint-env mocha */ 'use strict'; const assert = require('assert'); @@ -52,48 +51,6 @@ describe('Common', function () { }); }); // freezeDeep - describe('axiosResponseLogData', function () { - it('covers', function () { - const response = { - status: 200, - statusText: 'OK', - headers: { - 'Content-Type': 'text/plain', - }, - otherData: 'blah', - data: 'Old Mother West Wind had stopped to talk with the Slender Fir Tree. "I\'ve just come across the Green Meadows," said Old Mother West Wind, “and there I saw the Best Thing in the World.”', - }; - const expected = { - status: 200, - statusText: 'OK', - headers: { - 'Content-Type': 'text/plain', - }, - data: 'Old Mother West Wind had stopped to talk with the Slender Fir Tree. "I\'ve just come across the Green... (184 bytes)', - }; - const result = common.axiosResponseLogData(response); - assert.deepStrictEqual(result, expected); - }); - it('covers no data', function () { - const response = { - status: 200, - statusText: 'OK', - headers: { - 'Content-Type': 'text/plain', - }, - }; - const expected = { - status: 200, - statusText: 'OK', - headers: { - 'Content-Type': 'text/plain', - }, - }; - const result = common.axiosResponseLogData(response); - assert.deepStrictEqual(result, expected); - }); - }); // axiosResponseLogData - describe('logTruncate', function () { it('returns short string', function () { const str = 'this is a short string';