Skip to content

Commit

Permalink
Update src/components/OrgMemberDetail/OrgMemberDetails.test.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
varshith257 and coderabbitai[bot] authored May 23, 2024
1 parent 83b51f8 commit d55f74f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/OrgMemberDetail/OrgMemberDetails.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,9 @@ describe('OrgMemberDetail', () => {
expect(datePretty('2023-02-18T09:22:27.969Z')).toBe(
prettyDate('2023-02-18T09:22:27.969Z'),
);
// If there's some error in formatting the date
expect(datePretty('')).toBe('Unavailable');
// Handle edge cases where date input might be null or undefined
expect(datePretty(null)).toBe('Unavailable');

Check failure on line 362 in src/components/OrgMemberDetail/OrgMemberDetails.test.tsx

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Argument of type 'null' is not assignable to parameter of type 'string'.
expect(datePretty(undefined)).toBe('Unavailable');

Check failure on line 363 in src/components/OrgMemberDetail/OrgMemberDetails.test.tsx

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Argument of type 'undefined' is not assignable to parameter of type 'string'.
});

test('getLanguageName function should work properly', () => {
Expand Down

0 comments on commit d55f74f

Please sign in to comment.