Skip to content

Commit

Permalink
Fixes 2 failing unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Bishoy Boktor <[email protected]>
  • Loading branch information
Bishoy Boktor committed Mar 31, 2022
1 parent 278b80b commit 9f1cce2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/core/server/opensearch/opensearch_config.test.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/

export const mockReadFileSync = jest.fn();
jest.mock('fs', () => ({ readFileSync: mockReadFileSync }));
export const mockRead = jest.fn();
jest.mock('fs', () => ({ readFileSync: mockReadFileSync, read: mockRead }));

export const mockReadPkcs12Keystore = jest.fn();
export const mockReadPkcs12Truststore = jest.fn();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import React from 'react';
import { skip } from 'rxjs/operators';
import { mount } from 'enzyme';
import { I18nProvider } from '@osd/i18n/react';
import sizeMe from 'react-sizeme';
import { nextTick } from 'test_utils/enzyme_helpers';
import { DashboardViewport, DashboardViewportProps } from './dashboard_viewport';
import { DashboardContainer, DashboardContainerOptions } from '../dashboard_container';
Expand All @@ -45,13 +46,13 @@ import { OpenSearchDashboardsContextProvider } from '../../../../../opensearch_d
import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks';
import { applicationServiceMock } from '../../../../../../core/public/mocks';

sizeMe.noPlaceholders = true;

let dashboardContainer: DashboardContainer | undefined;

const ExitFullScreenButton = () => <div data-test-subj="exitFullScreenModeText">EXIT</div>;

function getProps(
props?: Partial<DashboardViewportProps>
): {
function getProps(props?: Partial<DashboardViewportProps>): {
props: DashboardViewportProps;
options: DashboardContainerOptions;
} {
Expand Down

0 comments on commit 9f1cce2

Please sign in to comment.