Skip to content

Commit

Permalink
Fix: fixed testing
Browse files Browse the repository at this point in the history
  • Loading branch information
alexappleget committed Oct 16, 2024
1 parent d621df0 commit 1559c7d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions api/apiFunctions.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,19 +386,12 @@ describe('apiFunctions', () => {

describe('getAllLeagueEntries()', () => {
it('should return the total number of entries and alive entries in a league', async () => {
const mockData = [
{ league: { $id: 'league1' }, eliminated: false },
{ league: { $id: 'league1' }, eliminated: true },
{ league: { $id: 'league1' }, eliminated: true },
{ league: { $id: 'league1' }, eliminated: true },
];

const mockLeague = ['league1'];

apiFunctions.getAllLeagueEntries.mockResolvedValue([
{ totalEntries: 4, alive: 1 },
]);

const mockLeague = ['league1'];

const mockResult = await apiFunctions.getAllLeagueEntries({ leagues: mockLeague });

expect(mockResult).toEqual([
Expand Down

0 comments on commit 1559c7d

Please sign in to comment.