X-Git-Url: http://git.squeep.com/?p=squeep-api-dingus;a=blobdiff_plain;f=test%2Flib%2Fcommon.js;h=57c4113a9db986dbee499942e6e11ea0a78964b9;hp=bacd6be3d54d2aaa7e6b019c98e0e664050392dc;hb=aee1a77b22217893a609e581de7e4d3521e2c54e;hpb=12568946a94e853c3c16974d57dd34de1ad3877c 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 = {