Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Feb 22, 2023
1 parent 1bb9f54 commit 29bdfcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jest.mock('../../hooks', () => {
return {
...jest.requireActual('../../hooks'),
useFleetStatus: jest.fn(),
useFleetServerStandalone: jest.fn(),
useAgentEnrollmentFlyoutData: jest.fn(),
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
useAgentEnrollmentFlyoutData,
KibanaVersionContext,
useFleetStatus,
useFleetServerStandalone,
} from '../../hooks';

import { useAdvancedForm } from '../../applications/fleet/components/fleet_server_instructions/hooks';
Expand Down Expand Up @@ -92,6 +93,7 @@ describe('<AgentEnrollmentFlyout />', () => {
],
},
});
jest.mocked(useFleetServerStandalone).mockReturnValue({ isFleetServerStandalone: false });

(useFleetStatus as jest.Mock).mockReturnValue({ isReady: true });
(useFleetServerUnhealthy as jest.Mock).mockReturnValue({
Expand Down

0 comments on commit 29bdfcf

Please sign in to comment.