From f063fb5a09d5e59a2a5c2fbed208dc000959c519 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Thu, 29 Aug 2024 15:24:43 +0200 Subject: [PATCH] Fix a broken test --- test/integration/live-api.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/live-api.test.js b/test/integration/live-api.test.js index 71d8aed..e013c0b 100644 --- a/test/integration/live-api.test.js +++ b/test/integration/live-api.test.js @@ -273,7 +273,7 @@ describe('API integration', { timeout: 30000 }, () => { original_md5hash: '1b199e02dd833b2278ce2a0e75480b14', }) // Because order is not same as input - const uploadsKeyed = Object.fromEntries(result.uploads, (upload) => [upload.name, upload]) + const uploadsKeyed = Object.fromEntries(result.uploads.map((upload) => [upload.name, upload])) expect(uploadsKeyed.file1).toMatchObject(getMatchObject({ name: 'file1' })) expect(uploadsKeyed.file2).toMatchObject(getMatchObject({ name: 'file2' })) expect(uploadsKeyed.file3).toMatchObject(getMatchObject({ name: 'file3' }))