From a24a24dea19481fefb84ee42e7e5cbe0f2eb06b4 Mon Sep 17 00:00:00 2001 From: Alex Anderson <191496+alxndrsn@users.noreply.github.com> Date: Wed, 5 Jun 2024 19:00:26 +0300 Subject: [PATCH] test/connection/inbound-parser: remove unused vars (#3245) Co-authored-by: alxndrsn --- .../test/unit/connection/inbound-parser-tests.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/pg/test/unit/connection/inbound-parser-tests.js b/packages/pg/test/unit/connection/inbound-parser-tests.js index af9385c40..081035f8a 100644 --- a/packages/pg/test/unit/connection/inbound-parser-tests.js +++ b/packages/pg/test/unit/connection/inbound-parser-tests.js @@ -3,9 +3,6 @@ require('./test-helper') const BufferList = require('../../buffer-list') var Connection = require('../../../lib/connection') var buffers = require('../../test-buffers') -var PARSE = function (buffer) { - return new Parser(buffer).parse() -} var authOkBuffer = buffers.authenticationOk() var paramStatusBuffer = buffers.parameterStatus('client_encoding', 'UTF8') @@ -16,17 +13,6 @@ var parseCompleteBuffer = buffers.parseComplete() var bindCompleteBuffer = buffers.bindComplete() var portalSuspendedBuffer = buffers.portalSuspended() -var addRow = function (bufferList, name, offset) { - return bufferList - .addCString(name) // field name - .addInt32(offset++) // table id - .addInt16(offset++) // attribute of column number - .addInt32(offset++) // objectId of field's data type - .addInt16(offset++) // datatype size - .addInt32(offset++) // type modifier - .addInt16(0) // format code, 0 => text -} - var row1 = { name: 'id', tableID: 1, @@ -289,7 +275,7 @@ test('Connection', function () { test('error messages', function () { test('with no fields', function () { - var msg = testForMessage(buffers.error(), { + testForMessage(buffers.error(), { name: 'error', }) })