Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor : src/components/CheckIn/CheckInWrapper.test.tsx from Jest to Vitest #2709

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,27 @@ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { checkInQueryMock } from './mocks';
import { StaticMockLink } from 'utils/StaticMockLink';

/**
* This file contains unit tests for the CheckInWrapper component.
*
* The tests cover:
* - Rendering and behavior of the modal component.
* - Functionality of the button to open and close the modal.
* - Integration with mocked GraphQL queries for testing Apollo Client.
*
* Purpose:
* These tests ensure that the CheckInWrapper component behaves as expected
* when opening and closing modals, and correctly integrates with its dependencies.
*/

const link = new StaticMockLink(checkInQueryMock, true);

describe('Testing CheckIn Wrapper', () => {
const props = {
eventId: 'event123',
};

test('The button to open and close the modal should work properly', async () => {
it('The button to open and close the modal should work properly', async () => {
render(
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
Expand Down
Loading