Skip to content

Commit

Permalink
test: fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed Nov 21, 2024
1 parent 99aaaa4 commit 2a95a63
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions lib/VersionHistory/getVersionMetadata.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({});
});
});

0 comments on commit 2a95a63

Please sign in to comment.