From 4c3b9177cf4cdc59848573d47c76811e5de4a3cc Mon Sep 17 00:00:00 2001 From: Alex Anderson <191496+alxndrsn@users.noreply.github.com> Date: Wed, 22 Jan 2025 08:30:52 +0300 Subject: [PATCH] test/db-migrations: assertRowsMatch(): use clearer var name (#1362) --- test/db-migrations/utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/db-migrations/utils.js b/test/db-migrations/utils.js index 5a1610bb7..b102e8bcd 100644 --- a/test/db-migrations/utils.js +++ b/test/db-migrations/utils.js @@ -77,22 +77,22 @@ function assertRowsMatch(actualRows, expectedRows) { const remainingRows = [...actualRows]; for (let i=0; i _.pick(r, Object.keys(x))); + const filteredRemainingRows = remainingRows.map(r => _.pick(r, Object.keys(expectedRow))); assert.fail( `Expected row ${i} not found:\njson=` + - JSON.stringify({ remainingRows, filteredRemainingRows, expectedRow: x }), + JSON.stringify({ remainingRows, filteredRemainingRows, expectedRow }), ); } }