Skip to content

Commit

Permalink
Attempting to fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerac4 committed Jan 14, 2025
1 parent c4b0c5e commit a369c91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
import useWindowSize from '~/core/hooks/useWindowSize';
import ForgotPasswordView from '~/features/authentication/public/ForgotPasswordView';
import Login from '~/features/authentication/public/LoginView';
import { renderRoutes, screen } from '~/vitest/utils';
import { renderRoutes, screen, waitFor } from '~/vitest/utils';

// Mock dependencies
vi.mock('~/core/hooks/useWindowSize');
Expand Down Expand Up @@ -70,8 +70,9 @@ describe('ForgotPasswordView', () => {
const loginLink = screen.getByText('Back to Login');
await user.click(loginLink);

const button = await screen.findByRole('button', { name: /sign in/i });
expect(button).toBeInTheDocument();
await waitFor(async () => {
return expect(screen.getByRole('button', { name: /sign in/i })).toBeInTheDocument();
});
});

it('displays GSplash when isDesktop is true', () => {
Expand Down
4 changes: 4 additions & 0 deletions app/src/vitest/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ HTMLCanvasElement.prototype.getContext = () => {
fillStyle: '',
};
};

process.on('unhandledRejection', (reason) => {
process.exit(1);
});

0 comments on commit a369c91

Please sign in to comment.