Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFlashAccount committed Dec 19, 2024
1 parent e9bbe60 commit 6e18508
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,14 @@ describe('SessionProvider', () => {
</Suspense>,
)

expect(refreshUserSession).not.toBeCalled()
expect(userSession).toBeCalledTimes(2)

await waitFor(() => {
expect(refreshUserSession).toBeCalledTimes(1)
expect(screen.getByText(/Hello/)).toBeInTheDocument()

// 2 initial calls(fetching session and refreshing session), 1 mutation call, 1 re-fetch call
expect(userSession).toBeCalledTimes(4)
expect(userSession).toBeCalledTimes(3)
})
})

Expand Down

0 comments on commit 6e18508

Please sign in to comment.