X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Flib%2Fcommon.js;h=57c4113a9db986dbee499942e6e11ea0a78964b9;hb=643614a3e1a7a8e32cf514a00b578ac177799d59;hp=bacd6be3d54d2aaa7e6b019c98e0e664050392dc;hpb=4778ea0b65e1f22f3d85cfa8bad0e1b29f87b7d3;p=squeep-api-dingus diff --git a/test/lib/common.js b/test/lib/common.js index bacd6be..57c4113 100644 --- a/test/lib/common.js +++ b/test/lib/common.js @@ -196,6 +196,32 @@ describe('common', function () { }); }); // responseLogData + describe('handlerLogData', function () { + it('covers', function () { + const req = { + method: 'GET', + somethingElse: 'blah', + }; + const res = { + getHeaders: () => ({}), + statusCode: 200, + blah: 'blah', + }; + const ctx = {}; + const result = common.handlerLogData(req, res, ctx); + assert.deepStrictEqual(result, { + req: { + method: 'GET', + }, + res: { + headers: {}, + statusCode: 200, + }, + ctx: {}, + }); + }); + }); // handlerLogData + describe('setOptions', function () { it('sets options', function () { const expected = {