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

Refactored src/components/AgendaCategory/AgendaCategoryContainer.test… #2912

Closed
Closed
Show file tree
Hide file tree
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 @@ -8,9 +8,9 @@ import {
fireEvent,
} from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import 'jest-localstorage-mock';
// import 'jest-localstorage-mock';
import { MockedProvider } from '@apollo/client/testing';
import 'jest-location-mock';
// import 'jest-location-mock';
import { I18nextProvider } from 'react-i18next';
import { Provider } from 'react-redux';
import { BrowserRouter } from 'react-router-dom';
Expand All @@ -25,14 +25,15 @@ import { StaticMockLink } from 'utils/StaticMockLink';
import AgendaCategoryContainer from './AgendaCategoryContainer';
import { props, props2 } from './AgendaCategoryContainerProps';
import { MOCKS, MOCKS_ERROR_MUTATIONS } from './AgendaCategoryContainerMocks';
import { vi } from 'vitest';

const link = new StaticMockLink(MOCKS, true);
const link2 = new StaticMockLink(MOCKS_ERROR_MUTATIONS, true);

jest.mock('react-toastify', () => ({
vi.mock('react-toastify', () => ({
toast: {
success: jest.fn(),
error: jest.fn(),
success: vi.fn(),
error: vi.fn(),
},
}));

Expand Down
5 changes: 3 additions & 2 deletions src/components/AgendaCategory/AgendaCategoryContainerProps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
type AgendaCategoryConnectionType = 'Organization';
import { vi } from 'vitest';

export const props = {
agendaCategoryConnection: 'Organization' as AgendaCategoryConnectionType,
Expand All @@ -24,11 +25,11 @@ export const props = {
},
},
],
agendaCategoryRefetch: jest.fn(),
agendaCategoryRefetch: vi.fn(),
};

export const props2 = {
agendaCategoryConnection: 'Organization' as AgendaCategoryConnectionType,
agendaCategoryData: [],
agendaCategoryRefetch: jest.fn(),
agendaCategoryRefetch: vi.fn(),
};
4 changes: 2 additions & 2 deletions src/components/CheckIn/tagTemplate.ts

Large diffs are not rendered by default.

Loading