Skip to content

Commit

Permalink
updating mock
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Nov 29, 2023
1 parent a62efc0 commit ff4de38
Showing 1 changed file with 6 additions and 9 deletions.
Expand Up @@ -9,20 +9,17 @@ import React from 'react';
import { I18nProvider } from '@kbn/i18n-react';
import { fireEvent, render } from '@testing-library/react'; // eslint-disable-line import/no-extraneous-dependencies
import { JobSelectorTable } from './job_selector_table';
import { kibanaContextMock } from '../../../contexts/kibana/__mocks__/kibana_context';

jest.mock('../../../contexts/kibana', () => ({
useMlKibana: jest.fn(() => {
return {
services: {
application: {
capabilities: {
ml: {
canCreateJob: true,
},
},
},
const mock = kibanaContextMock;
mock.services.application.capabilities = {
ml: {
canCreateJob: true,
},
};
return mock;
}),
}));

Expand Down

0 comments on commit ff4de38

Please sign in to comment.