Skip to content

Commit

Permalink
update core context mock
Browse files Browse the repository at this point in the history
Signed-off-by: tygao <[email protected]>
  • Loading branch information
raintygao committed May 28, 2024
1 parent d1f9ce8 commit 7b8ec87
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions public/contexts/__mocks__/core_context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import { BehaviorSubject } from 'rxjs';
import { coreMock } from '../../../../../src/core/public/mocks';
import { DataSourceServiceMock } from '../../services/data_source_service.mock';

export const useCore = jest.fn(() => {
const useCoreMock = {
Expand All @@ -24,11 +25,7 @@ export const useCore = jest.fn(() => {
load: jest.fn(),
},
conversationLoad: {},
dataSource: {
getDataSourceQuery() {
return { dataSourceId: '' };
},
},
dataSource: new DataSourceServiceMock(),
},
};
useCoreMock.services.http.delete.mockReturnValue(Promise.resolve());
Expand Down

0 comments on commit 7b8ec87

Please sign in to comment.