Skip to content

Commit

Permalink
fix failing tests - mock dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinashakirova committed Oct 23, 2024
1 parent a52b759 commit 65d0179
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ import { I18nProvider } from '@kbn/i18n-react';

import { ActivityView as ActivityViewComponent, ActivityViewProps } from './activity_view';

jest.mock('moment', () => {
const original = jest.requireActual('moment');
return () => {
const m = original;
m.tz = jest.fn(() => 'Europe/Madrid');
return m;
};
});

const mockGetUserProfile = jest.fn(async (uid: string) => ({
uid,
enabled: true,
Expand Down

0 comments on commit 65d0179

Please sign in to comment.