Skip to content

Commit

Permalink
improved coverage in Users.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
syedali237 committed Jan 18, 2025
1 parent 8da2030 commit f5a16ff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/screens/Users/Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ const Users = (): JSX.Element => {
/>
)}
<InfiniteScroll
dataLength={displayedUsers.length ?? 0}
dataLength={displayedUsers.length}
next={() => {
loadMoreUsers(displayedUsers.length, perPageResult);
}}
Expand Down Expand Up @@ -469,7 +469,7 @@ const Users = (): JSX.Element => {
index={index}
resetAndRefetch={resetAndRefetch}
user={user}
loggedInUserId={loggedInUserId ? loggedInUserId : ''}
loggedInUserId={loggedInUserId}
/>
);
},
Expand Down
10 changes: 10 additions & 0 deletions src/screens/Users/UsersMocks.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ export const MOCKS_NEW_2 = [
},
},
},
{
request: {
query: ORGANIZATION_CONNECTION_LIST,
},
result: {
data: {
organizationsConnection: [],
},
},
},
];

export const MOCKS_NEW = [

Check warning on line 84 in src/screens/Users/UsersMocks.mocks.ts

View check run for this annotation

Codecov / codecov/patch

src/screens/Users/UsersMocks.mocks.ts#L84

Added line #L84 was not covered by tests
Expand Down

0 comments on commit f5a16ff

Please sign in to comment.