From dd279c056d1674c8d76545a3955d2d1a4a3bfb71 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 14 Jan 2025 06:57:53 +0000 Subject: [PATCH] test/db-migrations: assertRowsMatch(): use clearer var name --- 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 85788ea01..50af60ba6 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 }), ); } }