Skip to content

Commit

Permalink
uncomment passing test
Browse files Browse the repository at this point in the history
  • Loading branch information
narthur committed Dec 25, 2024
1 parent 495db0a commit dce9834
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/containers/account/login.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//import { waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import { __mockedRouter } from 'next/router';

import { buildRenderer } from '~lib/test/buildRenderer';
//import { loadAuthGuardData } from '~lib/test/loadAuthGuardData';
import { loadAuthGuardData } from '~lib/test/loadAuthGuardData';
import Login from '~pages/[language]/account/login';

const renderPage = buildRenderer(Login);
Expand All @@ -14,13 +14,13 @@ describe('login page', () => {
expect(getByPlaceholderText('[email protected]')).toBeInTheDocument();
});

// it('redirects when user authenticated', async () => {
// loadAuthGuardData();
it('redirects when user authenticated', async () => {
loadAuthGuardData();

// await renderPage();
await renderPage();

// await waitFor(() => {
// expect(__mockedRouter.push).toHaveBeenCalledWith('/en/discover');
// });
// });
await waitFor(() => {
expect(__mockedRouter.push).toHaveBeenCalledWith('/en/discover');
});
});
});

0 comments on commit dce9834

Please sign in to comment.