Skip to content

Commit

Permalink
feat: add additional test (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
thenick775 authored Nov 16, 2024
1 parent 203f1b0 commit 91a87b5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gbajs3/src/components/modals/about.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ describe('<AboutModal>', () => {
expect(setIsModalOpenSpy).toHaveBeenCalledWith(false);
});

it('renders with release version if present', () => {
vi.stubEnv('VITE_GBA_RELEASE_VERSION', '0.0.0');

renderWithContext(<AboutModal />);

expect(screen.getByText('Version 0.0.0')).toBeVisible();
});

it('closes modal using the close button', async () => {
const setIsModalOpenSpy = vi.fn();
const { useModalContext: original } = await vi.importActual<
Expand Down

0 comments on commit 91a87b5

Please sign in to comment.