Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaStoeva committed Oct 22, 2024
1 parent b0718ce commit 82a6197
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { isBiggerThanGlobalMaxRetention } from './validations';

describe('isBiggerThanGlobalMaxRetention', () => {
it('should return undefined if any argument is missing', () => {
expect(isBiggerThanGlobalMaxRetention(undefined, 'd', '30d')).toBeUndefined();
expect(isBiggerThanGlobalMaxRetention(10, undefined, '30d')).toBeUndefined();
expect(isBiggerThanGlobalMaxRetention(10, 'd', undefined)).toBeUndefined();
expect(isBiggerThanGlobalMaxRetention('', 'd', '30d')).toBeUndefined();
expect(isBiggerThanGlobalMaxRetention(10, '', '30d')).toBeUndefined();
expect(isBiggerThanGlobalMaxRetention(10, 'd', '')).toBeUndefined();
});

it('should return an error message if retention is bigger than global max retention (in days)', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const isRetentionBiggerThan = (valueA: string, valueB: string) => {
};

export const isBiggerThanGlobalMaxRetention = (
retentionValue,
retentionTimeUnit,
globalMaxRetention
retentionValue: string | number,
retentionTimeUnit: string,
globalMaxRetention: string
) => {
if (!retentionValue || !retentionTimeUnit || !globalMaxRetention) {
return undefined;
Expand Down

0 comments on commit 82a6197

Please sign in to comment.