Skip to content

Commit

Permalink
test correction.
Browse files Browse the repository at this point in the history
  • Loading branch information
Smith authored and devinleighsmith committed Feb 9, 2024
1 parent aa7f819 commit 00e64f6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ describe('TakesDetailContainer component', () => {
});
});

it('returns the takes sorted by the created date', async () => {
it('returns the takes sorted by the id', async () => {
(useTakesRepository as jest.Mock).mockReturnValue({
getTakesByPropertyId: {
...mockGetApi,
response: [
{ ...getMockApiTakes(), appCreateTimestamp: '2020-01-01' },
{ ...getMockApiTakes(), appCreateTimestamp: '2020-01-02' },
{ ...getMockApiTakes(), id: '1' },
{ ...getMockApiTakes(), id: '2' },
],
},
getTakesCountByPropertyId: mockCountsApi,
});
setup({});

await waitFor(() => {
expect(viewProps.takes[0].appCreateTimestamp).toBe('2020-01-02');
expect(viewProps.takes[0].id).toBe('2');
});
});

Expand Down

0 comments on commit 00e64f6

Please sign in to comment.