Skip to content

Commit

Permalink
Fix no-import-assign error
Browse files Browse the repository at this point in the history
  • Loading branch information
karinathomasbbc committed Nov 25, 2024
1 parent 9fb125e commit a2fdfc7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/pages/MostReadPage/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ import MostReadPage from './MostReadPage';

fetch.mockResponse(JSON.stringify(pidginMostReadData));

analyticsUtils.getAtUserId = jest.fn();
jest.mock('#lib/analyticsUtils', () => {
return {
...jest.requireActual('#lib/analyticsUtils'),
getAtUserId: jest.fn(),
};
});

jest.mock('../../components/ChartbeatAnalytics', () => {
const ChartbeatAnalytics = () => <div>chartbeat</div>;
Expand Down

0 comments on commit a2fdfc7

Please sign in to comment.