From 3677c2a7afa9269ed0dbff05bca8f23cd99c9051 Mon Sep 17 00:00:00 2001 From: Charmander <~@charmander.me> Date: 2025年8月21日 18:08:37 -0700 Subject: [PATCH] test: Replace dead row length check with similar shape check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These object-mode rows don’t include a `length`. Dead code since 721cf56eb331bd35243c1425095b98cf09adf814 ("Rows are now associative arrays rather than straight arrays.")? --- .../pg/test/integration/client/simple-query-tests.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/pg/test/integration/client/simple-query-tests.js b/packages/pg/test/integration/client/simple-query-tests.js index af431d345..60a8f76f7 100644 --- a/packages/pg/test/integration/client/simple-query-tests.js +++ b/packages/pg/test/integration/client/simple-query-tests.js @@ -19,15 +19,8 @@ test('simple query interface', function () { rows.push(row['name']) }) query.once('row', function (row) { - test('Can iterate through columns', function () { - const columnCount = Object.keys(row).length - if ('length' in row) { - assert.lengthIs( - row, - columnCount, - 'Iterating through the columns gives a different length from calling .length.' - ) - } + test('returned right columns', function () { + assert.deepStrictEqual(row, { name: row.name }) }) })

AltStyle によって変換されたページ (->オリジナル) /