Skip to content

Commit

Permalink
Update failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vasharma05 committed Dec 10, 2024
1 parent b26360f commit 6f39c3a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import { getConfig } from '@openmrs/esm-config';
import { PageHeaderContent } from './page-header.component';
import { getCoreTranslation } from '@openmrs/esm-translations';

const mockedGetConfig = jest.mocked(getConfig);
const mockedGetCoreTranslation = jest.mocked(getCoreTranslation);

jest.mock('@openmrs/esm-config', () => ({
getConfig: jest.fn(),
Expand All @@ -22,6 +24,7 @@ describe('PageHeaderContent', () => {
});

it('renders implementation name when provided in config', async () => {
mockedGetCoreTranslation.mockReturnValueOnce('Test Clinic');
mockedGetConfig.mockResolvedValue({ implementationName: 'Test Clinic' });

render(<PageHeaderContent title="Test Title" illustration={mockIllustration} />);
Expand Down

0 comments on commit 6f39c3a

Please sign in to comment.