Skip to content

Commit

Permalink
modify test for getUserLeagues
Browse files Browse the repository at this point in the history
  • Loading branch information
kepsteen committed Oct 30, 2024
1 parent 4803767 commit 5735aa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@ describe('utils', () => {
});
});

xdescribe('getUserLeagues', () => {
describe('getUserLeagues', () => {
it('should return the list of leagues the user is a part of', async () => {
(getCurrentLeague as jest.Mock).mockResolvedValue(mockLeague);
const result = await getUserLeagues(mockUserData.leagues);
expect(result).toStrictEqual([mockLeague]);
});
it('should return an empty array if the user has no leagues', async () => {
const result = await getUserLeagues([]);
const result = await getUserLeagues(['']);
expect(getCurrentLeague).toHaveBeenCalledTimes(0);
expect(result).toStrictEqual([]);
});
Expand Down

0 comments on commit 5735aa3

Please sign in to comment.