Skip to content

Commit

Permalink
updating unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
VineetBala-AOT committed Jul 31, 2023
1 parent 6464965 commit 67f6f8f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion met-web/tests/unit/components/engagement/engagement.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, waitFor, screen } from '@testing-library/react';
import React from 'react';
import React, { ReactNode } from 'react';
import '@testing-library/jest-dom';
import EngagementView from 'components/engagement/view';
import { Contact } from 'models/contact';
Expand Down Expand Up @@ -102,6 +102,13 @@ jest.mock('components/map', () => () => {
return <div></div>;
});

jest.mock('components/permissionsGate', () => ({
...jest.requireActual('components/permissionsGate'),
PermissionsGate: ({ children }: { children: ReactNode }) => {
return <>{children}</>;
},
}));

describe('Engagement View page tests', () => {
jest.spyOn(reactRedux, 'useSelector').mockImplementation(() => jest.fn());
jest.spyOn(reactRedux, 'useDispatch').mockImplementation(() => jest.fn());
Expand Down

0 comments on commit 67f6f8f

Please sign in to comment.