Skip to content

Commit

Permalink
fix(stats): stats changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Oct 22, 2024
1 parent 607513c commit 9df8484
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/Stats/__tests__/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ describe('Component Test Stats', () => {
mockedUseUserStore.mockImplementation(() => [mockBudget])
})

it('verifies that the component triggers the fetching of stats on mount.', async () => {
it('verify that the component triggers the fetching of stats on mount.', () => {
const mockedGetStats = jest.spyOn(network, 'getStats')

render(<Stats />)

await waitFor(() => {
expect(mockedGetStats).toHaveBeenCalled()
})
;(async () => {
await waitFor(() => {
expect(mockedGetStats).toHaveBeenCalled()
})
})()
})

it('should display null if no stats are available', () => {
Expand Down

0 comments on commit 9df8484

Please sign in to comment.