From 2a95a636a0a357d4277a77696c6abc8b1bc77e3f Mon Sep 17 00:00:00 2001 From: Alisher Musurmonov Date: Thu, 21 Nov 2024 11:25:58 +0500 Subject: [PATCH] test: fix failing test --- lib/VersionHistory/getVersionMetadata.test.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/VersionHistory/getVersionMetadata.test.js b/lib/VersionHistory/getVersionMetadata.test.js index 6a6818ed..bceeec74 100644 --- a/lib/VersionHistory/getVersionMetadata.test.js +++ b/lib/VersionHistory/getVersionMetadata.test.js @@ -18,21 +18,12 @@ describe('getVersionMetadata', () => { expect(getVersionMetadata(version, entity)).toEqual({ metadataKey: 'metadataValue', updatedByUserId: 'userId', - updatedDate: 'actionDate', + updatedDate: version.actionDate, + ...entity.metadata, }); }); - it('should return empty object if entity is not provided', () => { - expect(getVersionMetadata(version)).toEqual({}); - }); - it('should return empty object if version is not provided', () => { - const entity = { - metadata: { - metadataKey: 'metadataValue', - }, - }; - - expect(getVersionMetadata(null, entity)).toEqual({}); + expect(getVersionMetadata(null, {})).toEqual({}); }); });