removed deprecated logger-related functions, default to console if no logger provided
[squeep-api-dingus] / test / lib / common.js
index a04bf614eeadac136f2df8ff44cf1519846d8221..15e9c4adb07652b1e0376327f5aa4a5e55426bf2 100644 (file)
@@ -128,34 +128,6 @@ describe('common', function () {
     });
   }); // pick
 
-  describe('requestLogData', function () {
-    it('gives data', function () {
-      const req = {
-        method: 'GET',
-        somethingElse: 'blah',
-      };
-      const result = common.requestLogData(req);
-      assert.deepStrictEqual(result, {
-        method: 'GET',
-      });
-    });
-  }); // requestLogData
-
-  describe('responseLogData', function () {
-    it('gives data', function () {
-      const res = {
-        getHeaders: () => ({}),
-        statusCode: 200,
-        blah: 'blah',
-      };
-      const result = common.responseLogData(res);
-      assert.deepStrictEqual(result, {
-        headers: {},
-        statusCode: 200,
-      });
-    });
-  }); // responseLogData
-
   describe('setOptions', function () {
     it('sets options', function () {
       const expected = {
@@ -258,13 +230,6 @@ describe('common', function () {
     });
   }); // requestId
 
-  describe('ensureLoggerLevels', function () {
-    it('adds missing levels', function () {
-      const result = common.ensureLoggerLevels();
-      assert.deepStrictEqual(result, common.nullLogger);
-    });
-  }); // ensureLoggerLevels
-
   describe('httpStatusCodeClass', function () {
     it('works', function () {
       for (const [statusCode, statusClassExpected] of Object.entries({