diff --git a/src/app/pages/MostReadPage/index.test.jsx b/src/app/pages/MostReadPage/index.test.jsx index e5321db3186..d6b6218d077 100644 --- a/src/app/pages/MostReadPage/index.test.jsx +++ b/src/app/pages/MostReadPage/index.test.jsx @@ -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 = () =>
chartbeat
;