Refresh token when token has expired

This commit is contained in:
Charles Bochet
2023-04-21 17:30:41 +02:00
parent 049664b98e
commit d3e9709e08
11 changed files with 174 additions and 133 deletions

View File

@ -1,15 +1,10 @@
import { render } from '@testing-library/react';
import { CallbackDefault } from '../__stories__/Callback.stories';
import { act } from 'react-dom/test-utils';
jest.mock('../../../hooks/auth/useRefreshToken', () => ({
useRefreshToken: () => ({ loading: false }),
}));
it('Checks the Callback page render', () => {
render(<CallbackDefault />);
});
afterEach(() => {
jest.clearAllMocks();
it('Checks the Callback page render', async () => {
await act(async () => {
render(<CallbackDefault />);
});
});