Skip to content

Commit 7b8ec87

Browse files
committed
update core context mock
Signed-off-by: tygao <[email protected]>
1 parent d1f9ce8 commit 7b8ec87

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

public/contexts/__mocks__/core_context.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import { BehaviorSubject } from 'rxjs';
77
import { coreMock } from '../../../../../src/core/public/mocks';
8+
import { DataSourceServiceMock } from '../../services/data_source_service.mock';
89

910
export const useCore = jest.fn(() => {
1011
const useCoreMock = {
@@ -24,11 +25,7 @@ export const useCore = jest.fn(() => {
2425
load: jest.fn(),
2526
},
2627
conversationLoad: {},
27-
dataSource: {
28-
getDataSourceQuery() {
29-
return { dataSourceId: '' };
30-
},
31-
},
28+
dataSource: new DataSourceServiceMock(),
3229
},
3330
};
3431
useCoreMock.services.http.delete.mockReturnValue(Promise.resolve());

0 commit comments

Comments
 (0)